1 | <?php |
||
12 | class MethodDispatcher implements MethodDispatcherInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var LoaderInterface |
||
16 | */ |
||
17 | private $loader; |
||
18 | |||
19 | /** |
||
20 | * @var ArgumentMapperInterface |
||
21 | */ |
||
22 | private $argumentMapper; |
||
23 | |||
24 | /** |
||
25 | * @var MethodInvokerInterface |
||
26 | */ |
||
27 | private $methodInvoker; |
||
28 | |||
29 | /** |
||
30 | * @var MethodCollection|null |
||
31 | */ |
||
32 | private $methodCollection = null; |
||
33 | |||
34 | /** |
||
35 | * Constructor. |
||
36 | * |
||
37 | * @param LoaderInterface $loader |
||
38 | * @param ArgumentMapperInterface $argumentMapper |
||
39 | * @param MethodInvokerInterface $methodInvoker |
||
40 | */ |
||
41 | public function __construct( |
||
50 | |||
51 | /** |
||
52 | * @return MethodCollection |
||
53 | */ |
||
54 | public function getMethodCollection() |
||
62 | |||
63 | /** |
||
64 | * @param string $methodName |
||
65 | * @param array $arguments |
||
66 | * |
||
67 | * @return mixed |
||
68 | * |
||
69 | * @throws MethodNotFoundException |
||
70 | */ |
||
71 | public function dispatch($methodName, array $arguments = []) |
||
84 | } |
||
85 |