1 | <?php |
||
12 | class Chief implements CommandBus |
||
13 | { |
||
14 | /** |
||
15 | * @var CommandBus |
||
16 | */ |
||
17 | protected $bus; |
||
18 | |||
19 | /** |
||
20 | * Constructor |
||
21 | * |
||
22 | * @param CommandBus $bus |
||
23 | * @param array $decorators Array of \Chief\Decorator objects |
||
24 | */ |
||
25 | public function __construct(CommandBus $bus = null, array $decorators = []) |
||
33 | |||
34 | /** |
||
35 | * Push a new Decorator on to the stack |
||
36 | * @param Decorator $decorator |
||
37 | */ |
||
38 | public function pushDecorator(Decorator $decorator) |
||
43 | |||
44 | /** |
||
45 | * Execute a command |
||
46 | * |
||
47 | * @param Command $command |
||
48 | * @throws \InvalidArgumentException |
||
49 | * @return mixed |
||
50 | */ |
||
51 | public function execute(Command $command) |
||
55 | } |
||
56 |