Пример #1
0
 /**
  * Removes a bootstrapper from the queue
  *
  * @param   BootstrapperInterface   $bootstrapper
  * @return  boolean    TRUE on success FALSE on failure
  * @throws \InvalidArgumentException if the object doesn't implement ObjectBootstrapperInterface
  */
 public function dequeue(ObjectHandlable $bootstrapper)
 {
     if (!$bootstrapper instanceof BootstrapperInterface) {
         throw new \InvalidArgumentException('Filter needs to implement BootstrapperInterface');
     }
     return parent::dequeue($bootstrapper);
 }
Пример #2
0
 /**
  * Remove a command handlder from the chain
  *
  * @param  CommandHandlerInterface  $handler  The command handler
  * @return  CommandChain
  */
 public function removeHandler(CommandHandlerInterface $handler)
 {
     $this->__queue->dequeue($handler);
     return $this;
 }
Пример #3
0
 /**
  * Removes a command from the queue
  *
  * @param   CommandInterface $command
  * @return  boolean    TRUE on success FALSE on failure
  * @throws  \InvalidArgumentException if the object implement CommandInterface
  */
 public function dequeue(ObjectHandlable $command)
 {
     if (!$command instanceof CommandInterface) {
         throw new \InvalidArgumentException('Command needs to implement CommandInterface');
     }
     return parent::dequeue($command);
 }
Пример #4
0
 /**
  * Removes a filter from the queue
  *
  * @param   TemplateFilterInterface   $filter
  * @return  boolean    TRUE on success FALSE on failure
  * @throws \InvalidArgumentException if the object doesn't implement TemplateFilterInterface
  */
 public function dequeue(ObjectHandlable $filter)
 {
     if (!$filter instanceof TemplateFilterInterface) {
         throw new \InvalidArgumentException('Filter needs to implement TemplateFilterInterface');
     }
     return parent::dequeue($filter);
 }