/**
  * setContext
  *
  * Set the context of the specification.
  *
  * @param mixed  $context  The new specification context.
  */
 public function setContext($context)
 {
     parent::setContext($context);
     foreach ($this->specs as $spec) {
         $spec->setContext($context);
     }
 }
Example #2
0
 public function isSatisfiedBy(Reference $reference)
 {
     $left = $this->left->isSatisfiedBy($reference);
     $right = $this->right->isSatisfiedBy($reference);
     return $left && $right;
 }
 /**
  * setContext
  *
  * Set the specification context; ensuring that we pass the new value to the composed specification.
  *
  * @param mixed  $context  The specification context.
  */
 public function setContext($context)
 {
     $this->spec->setContext($this->context);
     parent::setContext($context);
 }