/** * andX * * Return a new composite AND specification, chaining the current instance with the provided specification * * @param \ArpOdmSpecification\Entity\Specification\OdmSpecificationInterface $spec * @return \ArpOdmSpecification\Entity\Specification\AndSpecification */ public function andX(OdmSpecificationInterface $spec) { if ($this->spec) { // replace self return SF::andX($this->spec, $spec); } // No spec to add! return $spec; }
/** * andX * * Return a new composite AND specification, chaining the current instance with the provided specification * * @param \ArpOdmSpecification\Entity\Specification\OdmSpecificationInterface $spec * @return \ArpOdmSpecification\Entity\Specification\AndSpecification */ public function andX(OdmSpecificationInterface $spec) { return SF::andX($this, $spec); }