예제 #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);
 }
예제 #2
0
 /**
  * @expectedException \Novuso\System\Exception\UnderflowException
  */
 public function test_that_top_throws_exception_when_empty()
 {
     LinkedStack::of('int')->top();
 }
예제 #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);
 }
예제 #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);
 }