@@ 161-169 (lines=9) @@ | ||
158 | if ($callable instanceof DefinitionInterface) { |
|
159 | return $this->converter->convert($decoratedServiceName, $callable); |
|
160 | } |
|
161 | if (is_array($callable) && is_string($callable[0])) { |
|
162 | return new FactoryCallDefinition($decoratedServiceName, $callable[0], $callable[1], [$containerDefinition]); |
|
163 | } elseif (is_string($callable) && strpos($callable, '::') !== false) { |
|
164 | $pos = strpos($callable, '::'); |
|
165 | $className = substr($callable, 0, $pos); |
|
166 | $methodName = substr($callable, $pos + 2); |
|
167 | ||
168 | return new FactoryCallDefinition($decoratedServiceName, $className, $methodName, [$containerDefinition]); |
|
169 | } |
|
170 | ||
171 | // This is an object or a callback... we need to call the getServices method of the service provider at runtime. |
|
172 | return new CreateServiceFromRegistryDefinition($decoratedServiceName, $serviceName, $serviceProviderKey); |
|
@@ 191-199 (lines=9) @@ | ||
188 | if ($callable instanceof DefinitionInterface) { |
|
189 | return $this->converter->convert($decoratedServiceName, $callable); |
|
190 | } |
|
191 | if (is_array($callable) && is_string($callable[0])) { |
|
192 | return new FactoryCallDefinition($decoratedServiceName, $callable[0], $callable[1], [$containerDefinition, $previousDefinition]); |
|
193 | } elseif (is_string($callable) && strpos($callable, '::') !== false) { |
|
194 | $pos = strpos($callable, '::'); |
|
195 | $className = substr($callable, 0, $pos); |
|
196 | $methodName = substr($callable, $pos + 2); |
|
197 | ||
198 | return new FactoryCallDefinition($decoratedServiceName, $className, $methodName, [$containerDefinition, $previousDefinition]); |
|
199 | } |
|
200 | ||
201 | // This is an object or a callback... we need to call the getServices method of the service provider at runtime. |
|
202 | return new ExtendServiceFromRegistryDefinition($decoratedServiceName, $serviceName, $serviceProviderKey, $previousDefinition); |