Exemplo n.º 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;
 }
Exemplo n.º 2
0
 /**
  * @param SpecificationInterface $specification
  *
  * @return \Cubiche\Core\Specification\SpecificationInterface
  */
 public static function not(SpecificationInterface $specification)
 {
     return $specification->not();
 }
Exemplo n.º 3
0
 /**
  * @param SpecificationInterface $criteria
  *
  * @return $this
  */
 public function addSearchCriteria(SpecificationInterface $criteria)
 {
     $criteria->accept($this->specificationVisitorFactory->create($this));
     return $this;
 }