Ejemplo n.º 1
0
 /**
  * Constructs CommandPipeline
  *
  * @param CommandHandlerResolver $resolver The handler resolver
  * @param CommandFilter[]        $filters  A list of filters
  */
 public function __construct(CommandHandlerResolver $resolver, array $filters = [])
 {
     $this->resolver = $resolver;
     $this->filters = LinkedStack::of(CommandFilter::class);
     $this->filters->push($this);
     $this->addFilters($filters);
 }
Ejemplo n.º 2
0
 /**
  * @expectedException \Novuso\System\Exception\UnderflowException
  */
 public function test_that_top_throws_exception_when_empty()
 {
     LinkedStack::of('int')->top();
 }
Ejemplo n.º 3
0
 /**
  * Constructs CommandPipeline
  *
  * @param CommandBus $commandBus The command bus
  */
 public function __construct(CommandBus $commandBus)
 {
     $this->commandBus = $commandBus;
     $this->filters = LinkedStack::of(CommandFilter::class);
     $this->filters->push($this);
 }
Ejemplo n.º 4
0
 /**
  * Constructs QueryPipeline
  *
  * @param QueryBus $queryBus The query bus
  */
 public function __construct(QueryBus $queryBus)
 {
     $this->queryBus = $queryBus;
     $this->filters = LinkedStack::of(QueryFilter::class);
     $this->filters->push($this);
 }