feature #23561 [DI] Optimize use of private and pre-defined services (nicolas-grekas)
This PR was merged into the 4.0-dev branch.
Discussion
----------
[DI] Optimize use of private and pre-defined services
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes (perf)
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
By making private services really private and taking into account that (un)setting pre-defined services is not allowed anymore, we can go one step further into optimizing the dumped container.
Commits
-------
c0c1881fe4
[DI] Optimize use of private and pre-defined services
This commit is contained in:
commit
1cac0a0bba
@ -50,11 +50,6 @@ class Container implements ResettableContainerInterface
|
|||||||
protected $aliases = array();
|
protected $aliases = array();
|
||||||
protected $loading = array();
|
protected $loading = array();
|
||||||
|
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
*/
|
|
||||||
protected $privates = array();
|
|
||||||
|
|
||||||
private $envCache = array();
|
private $envCache = array();
|
||||||
private $compiled = false;
|
private $compiled = false;
|
||||||
|
|
||||||
@ -155,10 +150,6 @@ class Container implements ResettableContainerInterface
|
|||||||
throw new InvalidArgumentException('You cannot set service "service_container".');
|
throw new InvalidArgumentException('You cannot set service "service_container".');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->privates[$id])) {
|
|
||||||
throw new InvalidArgumentException(sprintf('You cannot set the private service "%s".', $id));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($this->methodMap[$id])) {
|
if (isset($this->methodMap[$id])) {
|
||||||
throw new InvalidArgumentException(sprintf('You cannot set the pre-defined service "%s".', $id));
|
throw new InvalidArgumentException(sprintf('You cannot set the pre-defined service "%s".', $id));
|
||||||
}
|
}
|
||||||
@ -185,9 +176,6 @@ class Container implements ResettableContainerInterface
|
|||||||
*/
|
*/
|
||||||
public function has($id)
|
public function has($id)
|
||||||
{
|
{
|
||||||
if (isset($this->privates[$id])) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (isset($this->aliases[$id])) {
|
if (isset($this->aliases[$id])) {
|
||||||
$id = $this->aliases[$id];
|
$id = $this->aliases[$id];
|
||||||
}
|
}
|
||||||
@ -224,13 +212,6 @@ class Container implements ResettableContainerInterface
|
|||||||
*/
|
*/
|
||||||
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
|
public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE)
|
||||||
{
|
{
|
||||||
if (isset($this->privates[$id])) {
|
|
||||||
if (self::EXCEPTION_ON_INVALID_REFERENCE === $invalidBehavior) {
|
|
||||||
throw new ServiceNotFoundException($id);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (isset($this->aliases[$id])) {
|
if (isset($this->aliases[$id])) {
|
||||||
$id = $this->aliases[$id];
|
$id = $this->aliases[$id];
|
||||||
}
|
}
|
||||||
@ -293,10 +274,6 @@ class Container implements ResettableContainerInterface
|
|||||||
*/
|
*/
|
||||||
public function initialized($id)
|
public function initialized($id)
|
||||||
{
|
{
|
||||||
if (isset($this->privates[$id])) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($this->aliases[$id])) {
|
if (isset($this->aliases[$id])) {
|
||||||
$id = $this->aliases[$id];
|
$id = $this->aliases[$id];
|
||||||
}
|
}
|
||||||
|
@ -401,7 +401,7 @@ class PhpDumper extends Dumper
|
|||||||
$instantiation = '';
|
$instantiation = '';
|
||||||
|
|
||||||
if (!$isProxyCandidate && $definition->isShared()) {
|
if (!$isProxyCandidate && $definition->isShared()) {
|
||||||
$instantiation = "\$this->services['$id'] = ".($isSimpleInstance ? '' : '$instance');
|
$instantiation = sprintf('$this->%s[\'%s\'] = %s', $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates', $id, $isSimpleInstance ? '' : '$instance');
|
||||||
} elseif (!$isSimpleInstance) {
|
} elseif (!$isSimpleInstance) {
|
||||||
$instantiation = '$instance';
|
$instantiation = '$instance';
|
||||||
}
|
}
|
||||||
@ -646,7 +646,7 @@ EOF;
|
|||||||
|
|
||||||
// with proxies, for 5.3.3 compatibility, the getter must be public to be accessible to the initializer
|
// with proxies, for 5.3.3 compatibility, the getter must be public to be accessible to the initializer
|
||||||
$isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition);
|
$isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition);
|
||||||
$visibility = $isProxyCandidate ? 'public' : 'protected';
|
$visibility = $isProxyCandidate ? 'public' : ($definition->isPublic() ? 'protected' : 'private');
|
||||||
$methodName = $this->generateMethodName($id);
|
$methodName = $this->generateMethodName($id);
|
||||||
$code = <<<EOF
|
$code = <<<EOF
|
||||||
|
|
||||||
@ -792,6 +792,7 @@ class $class extends $baseClass
|
|||||||
{
|
{
|
||||||
private \$parameters;
|
private \$parameters;
|
||||||
private \$targetDirs = array();
|
private \$targetDirs = array();
|
||||||
|
private \$privates = array();
|
||||||
|
|
||||||
EOF;
|
EOF;
|
||||||
}
|
}
|
||||||
@ -818,9 +819,8 @@ EOF;
|
|||||||
$code .= "\n \$this->parameters = \$this->getDefaultParameters();\n";
|
$code .= "\n \$this->parameters = \$this->getDefaultParameters();\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$code .= "\n \$this->services = array();\n";
|
$code .= "\n \$this->services = \$this->privates = array();\n";
|
||||||
$code .= $this->addMethodMap();
|
$code .= $this->addMethodMap();
|
||||||
$code .= $this->addPrivateServices();
|
|
||||||
$code .= $this->addAliases();
|
$code .= $this->addAliases();
|
||||||
|
|
||||||
$code .= <<<'EOF'
|
$code .= <<<'EOF'
|
||||||
@ -886,42 +886,14 @@ EOF;
|
|||||||
$code = " \$this->methodMap = array(\n";
|
$code = " \$this->methodMap = array(\n";
|
||||||
ksort($definitions);
|
ksort($definitions);
|
||||||
foreach ($definitions as $id => $definition) {
|
foreach ($definitions as $id => $definition) {
|
||||||
|
if ($definition->isPublic()) {
|
||||||
$code .= ' '.$this->export($id).' => '.$this->export($this->generateMethodName($id)).",\n";
|
$code .= ' '.$this->export($id).' => '.$this->export($this->generateMethodName($id)).",\n";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $code." );\n";
|
return $code." );\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds the privates property definition.
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
private function addPrivateServices()
|
|
||||||
{
|
|
||||||
if (!$definitions = $this->container->getDefinitions()) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$code = '';
|
|
||||||
ksort($definitions);
|
|
||||||
foreach ($definitions as $id => $definition) {
|
|
||||||
if (!$definition->isPublic()) {
|
|
||||||
$code .= ' '.$this->export($id)." => true,\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (empty($code)) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$out = " \$this->privates = array(\n";
|
|
||||||
$out .= $code;
|
|
||||||
$out .= " );\n";
|
|
||||||
|
|
||||||
return $out;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the aliases property definition.
|
* Adds the aliases property definition.
|
||||||
*
|
*
|
||||||
@ -1535,18 +1507,18 @@ EOF;
|
|||||||
return '$this';
|
return '$this';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->container->hasDefinition($id) && !$this->container->getDefinition($id)->isPublic()) {
|
if ($this->container->hasDefinition($id)) {
|
||||||
$code = sprintf('$this->%s()', $this->generateMethodName($id));
|
$code = sprintf('$this->%s()', $this->generateMethodName($id));
|
||||||
|
|
||||||
|
if ($this->container->getDefinition($id)->isShared()) {
|
||||||
|
$code = sprintf('($this->%s[\'%s\'] ?? %s)', $this->container->getDefinition($id)->isPublic() ? 'services' : 'privates', $id, $code);
|
||||||
|
}
|
||||||
} elseif (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference->getInvalidBehavior()) {
|
} elseif (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference->getInvalidBehavior()) {
|
||||||
$code = sprintf('$this->get(\'%s\', ContainerInterface::NULL_ON_INVALID_REFERENCE)', $id);
|
$code = sprintf('$this->get(\'%s\', ContainerInterface::NULL_ON_INVALID_REFERENCE)', $id);
|
||||||
} else {
|
} else {
|
||||||
$code = sprintf('$this->get(\'%s\')', $id);
|
$code = sprintf('$this->get(\'%s\')', $id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->container->hasDefinition($id) && $this->container->getDefinition($id)->isShared()) {
|
|
||||||
$code = "(\$this->services['$id'] ?? $code)";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $code;
|
return $code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ class ContainerTest extends TestCase
|
|||||||
|
|
||||||
$sc = new ProjectServiceContainer();
|
$sc = new ProjectServiceContainer();
|
||||||
$sc->set('foo', $obj = new \stdClass());
|
$sc->set('foo', $obj = new \stdClass());
|
||||||
$this->assertEquals(array('service_container', 'internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'internal_dependency', 'foo'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by factory methods in the method map, followed by service ids defined by set()');
|
$this->assertEquals(array('service_container', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'internal_dependency', 'foo'), $sc->getServiceIds(), '->getServiceIds() returns defined service ids by factory methods in the method map, followed by service ids defined by set()');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testSet()
|
public function testSet()
|
||||||
@ -340,26 +340,6 @@ class ContainerTest extends TestCase
|
|||||||
$this->assertTrue($clone->isPrivate());
|
$this->assertTrue($clone->isPrivate());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
|
|
||||||
* @expectedExceptionMessage You cannot set the private service "internal".
|
|
||||||
*/
|
|
||||||
public function testUnsetInternalPrivateService()
|
|
||||||
{
|
|
||||||
$c = new ProjectServiceContainer();
|
|
||||||
$c->set('internal', null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
|
|
||||||
* @expectedExceptionMessage You cannot set the private service "internal".
|
|
||||||
*/
|
|
||||||
public function testChangeInternalPrivateService()
|
|
||||||
{
|
|
||||||
$c = new ProjectServiceContainer();
|
|
||||||
$c->set('internal', new \stdClass());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testCheckExistenceOfAnInternalPrivateService()
|
public function testCheckExistenceOfAnInternalPrivateService()
|
||||||
{
|
{
|
||||||
$c = new ProjectServiceContainer();
|
$c = new ProjectServiceContainer();
|
||||||
@ -396,7 +376,6 @@ class ProjectServiceContainer extends Container
|
|||||||
public $__foo_baz;
|
public $__foo_baz;
|
||||||
public $__internal;
|
public $__internal;
|
||||||
protected $methodMap = array(
|
protected $methodMap = array(
|
||||||
'internal' => 'getInternalService',
|
|
||||||
'bar' => 'getBarService',
|
'bar' => 'getBarService',
|
||||||
'foo_bar' => 'getFooBarService',
|
'foo_bar' => 'getFooBarService',
|
||||||
'foo.baz' => 'getFoo_BazService',
|
'foo.baz' => 'getFoo_BazService',
|
||||||
@ -414,13 +393,13 @@ class ProjectServiceContainer extends Container
|
|||||||
$this->__foo_bar = new \stdClass();
|
$this->__foo_bar = new \stdClass();
|
||||||
$this->__foo_baz = new \stdClass();
|
$this->__foo_baz = new \stdClass();
|
||||||
$this->__internal = new \stdClass();
|
$this->__internal = new \stdClass();
|
||||||
$this->privates = array('internal' => true);
|
$this->privates = array();
|
||||||
$this->aliases = array('alias' => 'bar');
|
$this->aliases = array('alias' => 'bar');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getInternalService()
|
protected function getInternalService()
|
||||||
{
|
{
|
||||||
return $this->services['internal'] = $this->__internal;
|
return $this->privates['internal'] = $this->__internal;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getBarService()
|
protected function getBarService()
|
||||||
@ -459,7 +438,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
$this->services['internal_dependency'] = $instance = new \stdClass();
|
$this->services['internal_dependency'] = $instance = new \stdClass();
|
||||||
|
|
||||||
$instance->internal = isset($this->services['internal']) ? $this->services['internal'] : $this->getInternalService();
|
$instance->internal = $this->privates['internal'] ?? $this->getInternalService();
|
||||||
|
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,14 @@ class Container extends AbstractContainer
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
|
|
||||||
$this->aliases = array();
|
$this->aliases = array();
|
||||||
}
|
}
|
||||||
|
@ -20,13 +20,14 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
|
|
||||||
$this->aliases = array();
|
$this->aliases = array();
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -28,7 +29,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
$this->parameters = $this->getDefaultParameters();
|
$this->parameters = $this->getDefaultParameters();
|
||||||
|
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'test' => 'getTestService',
|
'test' => 'getTestService',
|
||||||
);
|
);
|
||||||
|
@ -20,6 +20,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -32,7 +33,7 @@ class ProjectServiceContainer extends Container
|
|||||||
}
|
}
|
||||||
$this->parameters = $this->getDefaultParameters();
|
$this->parameters = $this->getDefaultParameters();
|
||||||
|
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'test' => 'getTestService',
|
'test' => 'getTestService',
|
||||||
);
|
);
|
||||||
|
@ -20,13 +20,14 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'bar' => 'getBarService',
|
'bar' => 'getBarService',
|
||||||
);
|
);
|
||||||
|
@ -20,13 +20,14 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'service_from_anonymous_factory' => 'getServiceFromAnonymousFactoryService',
|
'service_from_anonymous_factory' => 'getServiceFromAnonymousFactoryService',
|
||||||
'service_with_method_call_and_factory' => 'getServiceWithMethodCallAndFactoryService',
|
'service_with_method_call_and_factory' => 'getServiceWithMethodCallAndFactoryService',
|
||||||
|
@ -20,13 +20,14 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'foo' => 'getFooService',
|
'foo' => 'getFooService',
|
||||||
);
|
);
|
||||||
|
@ -20,6 +20,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -28,7 +29,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
$this->parameters = $this->getDefaultParameters();
|
$this->parameters = $this->getDefaultParameters();
|
||||||
|
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'test' => 'getTestService',
|
'test' => 'getTestService',
|
||||||
);
|
);
|
||||||
|
@ -20,13 +20,14 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Container33\\Foo' => 'getSymfony_Component_DependencyInjection_Tests_Fixtures_Container33_FooService',
|
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Container33\\Foo' => 'getSymfony_Component_DependencyInjection_Tests_Fixtures_Container33_FooService',
|
||||||
);
|
);
|
||||||
|
@ -20,6 +20,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -28,7 +29,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
$this->parameters = $this->getDefaultParameters();
|
$this->parameters = $this->getDefaultParameters();
|
||||||
|
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
|
|
||||||
$this->aliases = array();
|
$this->aliases = array();
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -28,7 +29,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
$this->parameters = $this->getDefaultParameters();
|
$this->parameters = $this->getDefaultParameters();
|
||||||
|
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'BAR' => 'getBARService',
|
'BAR' => 'getBARService',
|
||||||
'BAR2' => 'getBAR2Service',
|
'BAR2' => 'getBAR2Service',
|
||||||
@ -87,7 +88,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
$this->services['BAR'] = $instance = new \stdClass();
|
$this->services['BAR'] = $instance = new \stdClass();
|
||||||
|
|
||||||
$instance->bar = ($this->services['bar'] ?? $this->get('bar'));
|
$instance->bar = ($this->services['bar'] ?? $this->getBar3Service());
|
||||||
|
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
@ -115,7 +116,7 @@ class ProjectServiceContainer extends Container
|
|||||||
*/
|
*/
|
||||||
protected function getBar3Service()
|
protected function getBar3Service()
|
||||||
{
|
{
|
||||||
$a = ($this->services['foo.baz'] ?? $this->get('foo.baz'));
|
$a = ($this->services['foo.baz'] ?? $this->getFoo_BazService());
|
||||||
|
|
||||||
$this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
|
$this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
|
||||||
|
|
||||||
@ -149,7 +150,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
$this->services['baz'] = $instance = new \Baz();
|
$this->services['baz'] = $instance = new \Baz();
|
||||||
|
|
||||||
$instance->setFoo(($this->services['foo_with_inline'] ?? $this->get('foo_with_inline')));
|
$instance->setFoo(($this->services['foo_with_inline'] ?? $this->getFooWithInlineService()));
|
||||||
|
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
@ -165,7 +166,7 @@ class ProjectServiceContainer extends Container
|
|||||||
protected function getConfiguredServiceService()
|
protected function getConfiguredServiceService()
|
||||||
{
|
{
|
||||||
$a = new \ConfClass();
|
$a = new \ConfClass();
|
||||||
$a->setFoo(($this->services['baz'] ?? $this->get('baz')));
|
$a->setFoo(($this->services['baz'] ?? $this->getBazService()));
|
||||||
|
|
||||||
$this->services['configured_service'] = $instance = new \stdClass();
|
$this->services['configured_service'] = $instance = new \stdClass();
|
||||||
|
|
||||||
@ -244,7 +245,7 @@ class ProjectServiceContainer extends Container
|
|||||||
*/
|
*/
|
||||||
protected function getFactoryServiceService()
|
protected function getFactoryServiceService()
|
||||||
{
|
{
|
||||||
return $this->services['factory_service'] = ($this->services['foo.baz'] ?? $this->get('foo.baz'))->getInstance();
|
return $this->services['factory_service'] = ($this->services['foo.baz'] ?? $this->getFoo_BazService())->getInstance();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -270,14 +271,14 @@ class ProjectServiceContainer extends Container
|
|||||||
*/
|
*/
|
||||||
protected function getFooService()
|
protected function getFooService()
|
||||||
{
|
{
|
||||||
$a = ($this->services['foo.baz'] ?? $this->get('foo.baz'));
|
$a = ($this->services['foo.baz'] ?? $this->getFoo_BazService());
|
||||||
|
|
||||||
$this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this);
|
$this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this);
|
||||||
|
|
||||||
$instance->foo = 'bar';
|
$instance->foo = 'bar';
|
||||||
$instance->moo = $a;
|
$instance->moo = $a;
|
||||||
$instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar');
|
$instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar');
|
||||||
$instance->setBar(($this->services['bar'] ?? $this->get('bar')));
|
$instance->setBar(($this->services['bar'] ?? $this->getBar3Service()));
|
||||||
$instance->initialize();
|
$instance->initialize();
|
||||||
sc_configure($instance);
|
sc_configure($instance);
|
||||||
|
|
||||||
@ -326,7 +327,7 @@ class ProjectServiceContainer extends Container
|
|||||||
$this->services['foo_with_inline'] = $instance = new \Foo();
|
$this->services['foo_with_inline'] = $instance = new \Foo();
|
||||||
|
|
||||||
$a->pub = 'pub';
|
$a->pub = 'pub';
|
||||||
$a->setBaz(($this->services['baz'] ?? $this->get('baz')));
|
$a->setBaz(($this->services['baz'] ?? $this->getBazService()));
|
||||||
|
|
||||||
$instance->setBar($a);
|
$instance->setBar($a);
|
||||||
|
|
||||||
@ -344,7 +345,7 @@ class ProjectServiceContainer extends Container
|
|||||||
protected function getLazyContextService()
|
protected function getLazyContextService()
|
||||||
{
|
{
|
||||||
return $this->services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () {
|
return $this->services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () {
|
||||||
yield 'k1' => ($this->services['foo.baz'] ?? $this->get('foo.baz'));
|
yield 'k1' => ($this->services['foo.baz'] ?? $this->getFoo_BazService());
|
||||||
yield 'k2' => $this;
|
yield 'k2' => $this;
|
||||||
}, 2), new RewindableGenerator(function () {
|
}, 2), new RewindableGenerator(function () {
|
||||||
return new \EmptyIterator();
|
return new \EmptyIterator();
|
||||||
@ -362,7 +363,7 @@ class ProjectServiceContainer extends Container
|
|||||||
protected function getLazyContextIgnoreInvalidRefService()
|
protected function getLazyContextIgnoreInvalidRefService()
|
||||||
{
|
{
|
||||||
return $this->services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () {
|
return $this->services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () {
|
||||||
yield 0 => ($this->services['foo.baz'] ?? $this->get('foo.baz'));
|
yield 0 => ($this->services['foo.baz'] ?? $this->getFoo_BazService());
|
||||||
}, 1), new RewindableGenerator(function () {
|
}, 1), new RewindableGenerator(function () {
|
||||||
return new \EmptyIterator();
|
return new \EmptyIterator();
|
||||||
}, 0));
|
}, 0));
|
||||||
@ -382,7 +383,7 @@ class ProjectServiceContainer extends Container
|
|||||||
|
|
||||||
$this->services['method_call1'] = $instance = new \Bar\FooClass();
|
$this->services['method_call1'] = $instance = new \Bar\FooClass();
|
||||||
|
|
||||||
$instance->setBar(($this->services['foo'] ?? $this->get('foo')));
|
$instance->setBar(($this->services['foo'] ?? $this->getFooService()));
|
||||||
$instance->setBar(NULL);
|
$instance->setBar(NULL);
|
||||||
$instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
|
$instance->setBar(($this->get("foo")->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
|
||||||
|
|
||||||
|
@ -20,6 +20,7 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
@ -32,7 +33,7 @@ class ProjectServiceContainer extends Container
|
|||||||
}
|
}
|
||||||
$this->parameters = $this->getDefaultParameters();
|
$this->parameters = $this->getDefaultParameters();
|
||||||
|
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'bar' => 'getBarService',
|
'bar' => 'getBarService',
|
||||||
);
|
);
|
||||||
|
@ -20,16 +20,16 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'bar_service' => 'getBarServiceService',
|
'bar_service' => 'getBarServiceService',
|
||||||
'baz_service' => 'getBazServiceService',
|
|
||||||
'foo_service' => 'getFooServiceService',
|
'foo_service' => 'getFooServiceService',
|
||||||
'translator.loader_1' => 'getTranslator_Loader1Service',
|
'translator.loader_1' => 'getTranslator_Loader1Service',
|
||||||
'translator.loader_2' => 'getTranslator_Loader2Service',
|
'translator.loader_2' => 'getTranslator_Loader2Service',
|
||||||
@ -38,9 +38,6 @@ class ProjectServiceContainer extends Container
|
|||||||
'translator_2' => 'getTranslator2Service',
|
'translator_2' => 'getTranslator2Service',
|
||||||
'translator_3' => 'getTranslator3Service',
|
'translator_3' => 'getTranslator3Service',
|
||||||
);
|
);
|
||||||
$this->privates = array(
|
|
||||||
'baz_service' => true,
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->aliases = array();
|
$this->aliases = array();
|
||||||
}
|
}
|
||||||
@ -71,7 +68,7 @@ class ProjectServiceContainer extends Container
|
|||||||
*/
|
*/
|
||||||
protected function getBarServiceService()
|
protected function getBarServiceService()
|
||||||
{
|
{
|
||||||
return $this->services['bar_service'] = new \stdClass(($this->services['baz_service'] ?? $this->getBazServiceService()));
|
return $this->services['bar_service'] = new \stdClass(($this->privates['baz_service'] ?? $this->getBazServiceService()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -85,9 +82,9 @@ class ProjectServiceContainer extends Container
|
|||||||
protected function getFooServiceService()
|
protected function getFooServiceService()
|
||||||
{
|
{
|
||||||
return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\ServiceLocator(array('bar' => function () {
|
return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\ServiceLocator(array('bar' => function () {
|
||||||
return ($this->services['bar_service'] ?? $this->get('bar_service'));
|
return ($this->services['bar_service'] ?? $this->getBarServiceService());
|
||||||
}, 'baz' => function (): \stdClass {
|
}, 'baz' => function (): \stdClass {
|
||||||
return ($this->services['baz_service'] ?? $this->getBazServiceService());
|
return ($this->privates['baz_service'] ?? $this->getBazServiceService());
|
||||||
}, 'nil' => function () {
|
}, 'nil' => function () {
|
||||||
return NULL;
|
return NULL;
|
||||||
}));
|
}));
|
||||||
@ -143,7 +140,7 @@ class ProjectServiceContainer extends Container
|
|||||||
protected function getTranslator1Service()
|
protected function getTranslator1Service()
|
||||||
{
|
{
|
||||||
return $this->services['translator_1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_1' => function () {
|
return $this->services['translator_1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_1' => function () {
|
||||||
return ($this->services['translator.loader_1'] ?? $this->get('translator.loader_1'));
|
return ($this->services['translator.loader_1'] ?? $this->getTranslator_Loader1Service());
|
||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -158,10 +155,10 @@ class ProjectServiceContainer extends Container
|
|||||||
protected function getTranslator2Service()
|
protected function getTranslator2Service()
|
||||||
{
|
{
|
||||||
$this->services['translator_2'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_2' => function () {
|
$this->services['translator_2'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_2' => function () {
|
||||||
return ($this->services['translator.loader_2'] ?? $this->get('translator.loader_2'));
|
return ($this->services['translator.loader_2'] ?? $this->getTranslator_Loader2Service());
|
||||||
})));
|
})));
|
||||||
|
|
||||||
$instance->addResource('db', ($this->services['translator.loader_2'] ?? $this->get('translator.loader_2')), 'nl');
|
$instance->addResource('db', ($this->services['translator.loader_2'] ?? $this->getTranslator_Loader2Service()), 'nl');
|
||||||
|
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
@ -176,10 +173,10 @@ class ProjectServiceContainer extends Container
|
|||||||
*/
|
*/
|
||||||
protected function getTranslator3Service()
|
protected function getTranslator3Service()
|
||||||
{
|
{
|
||||||
$a = ($this->services['translator.loader_3'] ?? $this->get('translator.loader_3'));
|
$a = ($this->services['translator.loader_3'] ?? $this->getTranslator_Loader3Service());
|
||||||
|
|
||||||
$this->services['translator_3'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_3' => function () {
|
$this->services['translator_3'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_3' => function () {
|
||||||
return ($this->services['translator.loader_3'] ?? $this->get('translator.loader_3'));
|
return ($this->services['translator.loader_3'] ?? $this->getTranslator_Loader3Service());
|
||||||
})));
|
})));
|
||||||
|
|
||||||
$instance->addResource('db', $a, 'nl');
|
$instance->addResource('db', $a, 'nl');
|
||||||
@ -200,8 +197,8 @@ class ProjectServiceContainer extends Container
|
|||||||
*
|
*
|
||||||
* @return \stdClass A stdClass instance
|
* @return \stdClass A stdClass instance
|
||||||
*/
|
*/
|
||||||
protected function getBazServiceService()
|
private function getBazServiceService()
|
||||||
{
|
{
|
||||||
return $this->services['baz_service'] = new \stdClass();
|
return $this->privates['baz_service'] = new \stdClass();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,21 +20,18 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'bar_service' => 'getBarServiceService',
|
'bar_service' => 'getBarServiceService',
|
||||||
'baz_service' => 'getBazServiceService',
|
|
||||||
'foo_service' => 'getFooServiceService',
|
'foo_service' => 'getFooServiceService',
|
||||||
);
|
);
|
||||||
$this->privates = array(
|
|
||||||
'baz_service' => true,
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->aliases = array();
|
$this->aliases = array();
|
||||||
}
|
}
|
||||||
@ -65,7 +62,7 @@ class ProjectServiceContainer extends Container
|
|||||||
*/
|
*/
|
||||||
protected function getBarServiceService()
|
protected function getBarServiceService()
|
||||||
{
|
{
|
||||||
return $this->services['bar_service'] = new \stdClass(($this->services['baz_service'] ?? $this->getBazServiceService()));
|
return $this->services['bar_service'] = new \stdClass(($this->privates['baz_service'] ?? $this->getBazServiceService()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,7 +75,7 @@ class ProjectServiceContainer extends Container
|
|||||||
*/
|
*/
|
||||||
protected function getFooServiceService()
|
protected function getFooServiceService()
|
||||||
{
|
{
|
||||||
return $this->services['foo_service'] = new \stdClass(($this->services['baz_service'] ?? $this->getBazServiceService()));
|
return $this->services['foo_service'] = new \stdClass(($this->privates['baz_service'] ?? $this->getBazServiceService()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,8 +90,8 @@ class ProjectServiceContainer extends Container
|
|||||||
*
|
*
|
||||||
* @return \stdClass A stdClass instance
|
* @return \stdClass A stdClass instance
|
||||||
*/
|
*/
|
||||||
protected function getBazServiceService()
|
private function getBazServiceService()
|
||||||
{
|
{
|
||||||
return $this->services['baz_service'] = new \stdClass();
|
return $this->privates['baz_service'] = new \stdClass();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,21 +20,18 @@ class ProjectServiceContainer extends Container
|
|||||||
{
|
{
|
||||||
private $parameters;
|
private $parameters;
|
||||||
private $targetDirs = array();
|
private $targetDirs = array();
|
||||||
|
private $privates = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->services = array();
|
$this->services = $this->privates = array();
|
||||||
$this->methodMap = array(
|
$this->methodMap = array(
|
||||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => 'getSymfony_Component_DependencyInjection_Tests_Fixtures_TestServiceSubscriberService',
|
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => 'getSymfony_Component_DependencyInjection_Tests_Fixtures_TestServiceSubscriberService',
|
||||||
'autowired.Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => 'getAutowired_Symfony_Component_DependencyInjection_Tests_Fixtures_CustomDefinitionService',
|
|
||||||
'foo_service' => 'getFooServiceService',
|
'foo_service' => 'getFooServiceService',
|
||||||
);
|
);
|
||||||
$this->privates = array(
|
|
||||||
'autowired.Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true,
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->aliases = array();
|
$this->aliases = array();
|
||||||
}
|
}
|
||||||
@ -81,13 +78,13 @@ class ProjectServiceContainer extends Container
|
|||||||
protected function getFooServiceService()
|
protected function getFooServiceService()
|
||||||
{
|
{
|
||||||
return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber(new \Symfony\Component\DependencyInjection\ServiceLocator(array('Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => function (): \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition {
|
return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber(new \Symfony\Component\DependencyInjection\ServiceLocator(array('Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => function (): \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition {
|
||||||
return ($this->services['autowired.Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] ?? $this->getAutowired_Symfony_Component_DependencyInjection_Tests_Fixtures_CustomDefinitionService());
|
return ($this->privates['autowired.Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] ?? $this->getAutowired_Symfony_Component_DependencyInjection_Tests_Fixtures_CustomDefinitionService());
|
||||||
}, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => function (): \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber {
|
}, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => function (): \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber {
|
||||||
return ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] ?? $this->get('Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'));
|
return ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] ?? $this->getSymfony_Component_DependencyInjection_Tests_Fixtures_TestServiceSubscriberService());
|
||||||
}, 'bar' => function (): \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition {
|
}, 'bar' => function (): \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition {
|
||||||
return ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] ?? $this->get('Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'));
|
return ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] ?? $this->getSymfony_Component_DependencyInjection_Tests_Fixtures_TestServiceSubscriberService());
|
||||||
}, 'baz' => function (): \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition {
|
}, 'baz' => function (): \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition {
|
||||||
return ($this->services['autowired.Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] ?? $this->getAutowired_Symfony_Component_DependencyInjection_Tests_Fixtures_CustomDefinitionService());
|
return ($this->privates['autowired.Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] ?? $this->getAutowired_Symfony_Component_DependencyInjection_Tests_Fixtures_CustomDefinitionService());
|
||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,8 +102,8 @@ class ProjectServiceContainer extends Container
|
|||||||
*
|
*
|
||||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition A Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition instance
|
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition A Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition instance
|
||||||
*/
|
*/
|
||||||
protected function getAutowired_Symfony_Component_DependencyInjection_Tests_Fixtures_CustomDefinitionService()
|
private function getAutowired_Symfony_Component_DependencyInjection_Tests_Fixtures_CustomDefinitionService()
|
||||||
{
|
{
|
||||||
return $this->services['autowired.Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition();
|
return $this->privates['autowired.Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user