1 | <?php |
||
33 | class Factory extends ObjectAbstract implements FactoryInterface |
||
34 | { |
||
35 | use FactoryTrait; |
||
36 | |||
37 | /** |
||
38 | * @param Container $container |
||
39 | * @access public |
||
40 | */ |
||
41 | public function __construct(Container $container) |
||
45 | |||
46 | /** |
||
47 | * {@inheritDoc} |
||
48 | */ |
||
49 | public function createInstance(/*# string */ $rawId, array $arguments) |
||
69 | |||
70 | /** |
||
71 | * {@inheritDoc} |
||
72 | */ |
||
73 | public function executeCallable($callable, array $arguments = []) |
||
88 | |||
89 | /** |
||
90 | * {@inheritDoc} |
||
91 | */ |
||
92 | public function executeMethodBatch(array $methods, $object = null) |
||
100 | |||
101 | /** |
||
102 | * if $object provided, build callable like [$object, $method] and execute it. |
||
103 | * |
||
104 | * method: |
||
105 | * - ['function', [ arguments...]] |
||
106 | * |
||
107 | * - [ callable, [ arguments ...]] |
||
108 | * |
||
109 | * - ['method', [ arguments ...]] |
||
110 | * convert to [[$object, 'method'], [ ... ]] |
||
111 | * |
||
112 | * @param mixed method |
||
113 | * @param object|null $object to construct callable |
||
114 | * @throws LogicException if something goes wrong |
||
115 | * @access protected |
||
116 | */ |
||
117 | protected function executeMethod($method, $object = null) |
||
131 | |||
132 | /** |
||
133 | * Things to do after an object created. |
||
134 | * |
||
135 | * @param object $object |
||
136 | * @param array $definition service definition for $object |
||
137 | * @access protected |
||
138 | */ |
||
139 | protected function afterCreation($object, array $definition) |
||
151 | |||
152 | /** |
||
153 | * Execute common methods defined in 'di.common' for all objects |
||
154 | * |
||
155 | * Methods are in the form of |
||
156 | * |
||
157 | * [ interfaceOrClassname, [methodOrCallable, ArgumentsArray]], |
||
158 | * [ testCallable($obj, $container), [methodOrCallable, ArgumentsArray], |
||
159 | * ... |
||
160 | * |
||
161 | * @param object $object |
||
162 | * @return $this |
||
163 | * @access protected |
||
164 | */ |
||
165 | protected function executeCommonBatch($object) |
||
186 | } |
||
187 |