예제 #1
0
 /**
  * Extracts an entity from the space all together
  * 
  * @param AnDomainEntityAbstract $entity Extracts an entity from the domain space
  * 
  * @return void
  */
 public function extractEntity($entity)
 {
     $this->_entities->dequeue($entity);
     unset($this->_states[$entity]);
 }
예제 #2
0
 /**
  * Removes a command from the chain
  *
  * @param  KCommandHandlerInterface  $handler  The command handler
  * @return  KCommandChain
  */
 public function removeHandler(KCommandHandlerInterface $handler)
 {
     $this->__queue->dequeue($handler);
     return $this;
 }
예제 #3
0
파일: chain.php 프로젝트: stonyyi/anahita
 /**
  * Removes a command from the queue
  *
  * @param   KCommandInterface $command
  * @return  boolean	TRUE on success FALSE on failure
  * @throws  InvalidArgumentException if the object implement KCommandInterface
  */
 public function dequeue(KObjectHandlable $command)
 {
     if (!$command instanceof KCommandInterface) {
         throw new InvalidArgumentException('Command needs to implement KCommandInterface');
     }
     return parent::dequeue($command);
 }
예제 #4
0
파일: queue.php 프로젝트: stonyyi/anahita
 /**
  * (non-PHPdoc).
  *
  * @see KObjectQueue::dequeue()
  */
 public function dequeue(KObjectHandlable $object)
 {
     $this->getRepositoryEntities($object->getRepository())->extract($object);
     return parent::dequeue($object);
 }