/** * @see Hashable::getHash * * @since 0.1 * * @return string */ public function getHash() { return sha1(implode('|', array(sha1($this->mainSnak->getHash() . $this->qualifiers->getHash()), $this->rank, $this->references->getValueHash()))); }
/** * @see Hashable::getHash * * @since 0.1 * * @return string */ public function getHash() { // For considering the reference snaks' property order without actually manipulating the // reference snaks's order, a new SnakList is generated. The new SnakList is ordered // by property and its hash is returned. $orderedSnaks = new SnakList($this->snaks); $orderedSnaks->orderByProperty(); return $orderedSnaks->getHash(); }