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