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