Example #1
0
 /**
  * Moves forward to next applicable processor
  */
 protected function nextApplicable()
 {
     $this->index++;
     while ($this->index <= $this->maxIndex) {
         $applicable = $this->applicableChecker->isApplicable($this->context, $this->processors[$this->action][$this->index]['attributes']);
         if ($applicable !== ApplicableCheckerInterface::NOT_APPLICABLE) {
             break;
         }
         $this->index++;
     }
 }
Example #2
0
 /**
  * Adds a checker to $this->processorApplicableChecker
  *
  * @param ApplicableCheckerInterface $checker
  */
 protected function registerApplicableChecker(ApplicableCheckerInterface $checker)
 {
     if ($checker instanceof ProcessorBagAwareApplicableCheckerInterface) {
         $checker->setProcessorBag($this);
     }
     $this->processorApplicableChecker->addChecker($checker);
 }