1 | <?php |
||
8 | class Factory |
||
9 | { |
||
10 | protected $client; |
||
11 | |||
12 | /** |
||
13 | * @param RequestableInterface $client |
||
14 | */ |
||
15 | public function __construct(RequestableInterface $client) |
||
19 | |||
20 | /** |
||
21 | * @param $method |
||
22 | * @param $parameters |
||
23 | * @return mixed |
||
24 | * @throws ClassNotCreatedException |
||
25 | * @throws \ReflectionException |
||
26 | */ |
||
27 | public function __call($method, $parameters) |
||
39 | |||
40 | /** |
||
41 | * Get namespace |
||
42 | * |
||
43 | * @return string |
||
44 | * @throws \ReflectionException |
||
45 | */ |
||
46 | private function getNamespace() |
||
52 | |||
53 | /** |
||
54 | * Get Fully Qualified Name |
||
55 | * |
||
56 | * build and return fully qualified name |
||
57 | * for class to instantiate |
||
58 | * |
||
59 | * @param $method |
||
60 | * @return string |
||
61 | * @throws \ReflectionException |
||
62 | */ |
||
63 | protected function getQualifiedName($method) |
||
67 | |||
68 | /** |
||
69 | * Parameter Has ID |
||
70 | * |
||
71 | * is there a parameter being passed in, and is it |
||
72 | * an integer? |
||
73 | * |
||
74 | * @param $parameters |
||
75 | * @return bool |
||
76 | * @throws \InvalidArgumentException |
||
77 | */ |
||
78 | protected function paramIsId($parameters) |
||
87 | } |
||
88 |