Exemple #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]);
 }
 /**
  * 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;
 }
Exemple #3
0
 /**
  * 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);
 }
Exemple #4
0
 /**
  * (non-PHPdoc).
  *
  * @see KObjectQueue::dequeue()
  */
 public function dequeue(KObjectHandlable $object)
 {
     $this->getRepositoryEntities($object->getRepository())->extract($object);
     return parent::dequeue($object);
 }