예제 #1
0
 /**
  * @param SpecificationInterface $criteria
  *
  * @return $this
  */
 public function thatMatchToCriteria(SpecificationInterface $criteria)
 {
     $collection = $this->valueAsCollection();
     foreach ($collection as $item) {
         if (!$this->checkMatchResult($criteria->evaluate($item))) {
             return $this;
         }
     }
     $this->pass();
     return $this;
 }