1 | <?php |
||
33 | class Factory extends ObjectAbstract implements FactoryInterface |
||
34 | { |
||
35 | use FactoryHelperTrait; |
||
36 | |||
37 | /** |
||
38 | * @param ResolverInterface |
||
39 | * @access public |
||
40 | */ |
||
41 | public function __construct(ResolverInterface $resolver) |
||
45 | |||
46 | /** |
||
47 | * {@inheritDoc} |
||
48 | */ |
||
49 | public function createInstance(/*# string */ $rawId, array $arguments) |
||
68 | |||
69 | /** |
||
70 | * {@inheritDoc} |
||
71 | */ |
||
72 | public function executeCallable($callable, array $arguments = []) |
||
87 | |||
88 | /** |
||
89 | * {@inheritDoc} |
||
90 | */ |
||
91 | public function executeMethodBatch(array $methods, $object = null) |
||
97 | |||
98 | /** |
||
99 | * if $object provided, build callable like [$object, $method] and execute it. |
||
100 | * |
||
101 | * method: |
||
102 | * |
||
103 | * - callable |
||
104 | * |
||
105 | * - array ['function', [ arguments...]] |
||
106 | * |
||
107 | * - array [callable, [ arguments ...]] |
||
108 | * |
||
109 | * - array ['method', [ arguments ...]] |
||
110 | * will be converted to [[$object, 'method'], [ ... ]] |
||
111 | * |
||
112 | * @param array|callable 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 for all objects |
||
154 | * |
||
155 | * @param object $object |
||
156 | * @access protected |
||
157 | */ |
||
158 | protected function executeCommonBatch($object) |
||
169 | } |
||
170 |