예제 #1
0
 /**
  * {inheritdoc}
  */
 public function create(Specification $spec, QueryBuilder $qb)
 {
     if (!$spec instanceof Not) {
         throw new \InvalidArgumentException();
     }
     $factory = $this->registry->getFactory($spec->getWrappedSpecification());
     return $qb->expr()->not($factory->create($spec->getWrappedSpecification(), $qb));
 }
예제 #2
0
 /**
  * {inheritdoc}
  */
 public function create(Specification $spec, QueryBuilder $qb)
 {
     if (!$spec instanceof OrX) {
         throw new \InvalidArgumentException();
     }
     $firstPartFactory = $this->registry->getFactory($spec->getFirstPart());
     $secondPartFactory = $this->registry->getFactory($spec->getSecondPart());
     return $qb->expr()->orx($firstPartFactory->create($spec->getFirstPart(), $qb), $secondPartFactory->create($spec->getSecondPart(), $qb));
 }