Esempio n. 1
0
 /**
  * Checks if another verb is equal.
  *
  * Two verbs are equal if and only if all of their properties are equal.
  *
  * @param Verb $verb The verb to compare with
  *
  * @return bool True if the verbs are equal, false otherwise
  */
 public function equals(Verb $verb)
 {
     if ($this->id !== $verb->getId()) {
         return false;
     }
     if (count($this->display) !== count($verb->getDisplay())) {
         return false;
     }
     foreach ($this->display as $language => $value) {
         if (!isset($verb->display[$language])) {
             return false;
         }
         if ($value !== $verb->display[$language]) {
             return false;
         }
     }
     return true;
 }
Esempio n. 2
0
 /**
  * Filters by a verb.
  *
  * @param Verb $verb The Verb to filter by
  *
  * @return self The statements filter
  */
 public function byVerb(Verb $verb)
 {
     $this->filter['verb'] = $verb->getId();
     return $this;
 }