1 | <?php namespace Rossedman\Teamwork; |
||
6 | class Factory { |
||
7 | |||
8 | protected $client; |
||
9 | |||
10 | /** |
||
11 | * @param RequestableInterface $client |
||
12 | */ |
||
13 | public function __construct(RequestableInterface $client) |
||
17 | |||
18 | /** |
||
19 | * @param $method |
||
20 | * @param $parameters |
||
21 | * |
||
22 | * @return mixed |
||
23 | * @throws ClassNotCreatedException |
||
24 | */ |
||
25 | public function __call($method, $parameters) |
||
38 | |||
39 | /** |
||
40 | * Get Namespace |
||
41 | * |
||
42 | * @return mixed |
||
43 | */ |
||
44 | private function getNamespace() |
||
50 | |||
51 | /** |
||
52 | * Get Fully Qualified Name |
||
53 | * |
||
54 | * build and return fully qualified name |
||
55 | * for class to instantiate |
||
56 | * |
||
57 | * @param $method |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | protected function getQualifiedName($method) |
||
65 | |||
66 | /** |
||
67 | * Parameter Has ID |
||
68 | * |
||
69 | * is there a parameter being passed in, and is it |
||
70 | * an integer? |
||
71 | * |
||
72 | * @param $parameters |
||
73 | * |
||
74 | * @return bool |
||
75 | */ |
||
76 | protected function paramIsId($parameters) |
||
87 | |||
88 | /** |
||
89 | * @param $class |
||
90 | * |
||
91 | * @throws ClassNotCreatedException |
||
92 | */ |
||
93 | protected function doesClassExist($class) |
||
100 | } |
||
101 |