1 | <?php |
||
10 | class NamespaceLocator implements HandlerLocator |
||
11 | { |
||
12 | /** |
||
13 | * The container instance. |
||
14 | * |
||
15 | * @var \Illuminate\Contracts\Container\Container |
||
16 | */ |
||
17 | protected $container; |
||
18 | |||
19 | /** |
||
20 | * The configuration instance. |
||
21 | * |
||
22 | * @var \Illuminate\Contracts\Config\Repository |
||
23 | */ |
||
24 | protected $config; |
||
25 | |||
26 | /** |
||
27 | * Create a new namespace locator instance. |
||
28 | * |
||
29 | * @param \Illuminate\Contracts\Container\Container $container |
||
30 | * @param \Illuminate\Contracts\Config\Repository $config |
||
31 | */ |
||
32 | public function __construct(Container $container, Configuration $config) |
||
37 | |||
38 | /** |
||
39 | * Returns the handler located in the configured namespace for given command. |
||
40 | * |
||
41 | * @param string $command |
||
42 | * @return object |
||
43 | * |
||
44 | * @throws \League\Tactician\Exception\MissingHandlerException |
||
45 | */ |
||
46 | public function getHandlerForCommand($command) |
||
62 | } |
||
63 |