Array ( [Container%s/removed-ids.php] => true, 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'configurator_service' => true, 'configurator_service_simple' => true, 'decorated.pif-pouf' => true, 'decorator_service.inner' => true, 'errored_definition' => true, 'factory_simple' => true, 'inlined' => true, 'new_factory' => true, 'tagged_iterator_foo' => true, ); [Container%s/getBAR2Service.php] => services['BAR'] = $instance = new \stdClass(); $instance->bar = ($this->services['bar'] ?? $this->getBarService()); return $instance; [Container%s/getBAR22Service.php] => services['BAR2'] = new \stdClass(); [Container%s/getBar23Service.php] => services['bar2'] = new \stdClass(); [Container%s/getBazService.php] => services['baz'] = $instance = new \Baz(); $instance->setFoo(($this->services['foo_with_inline'] ?? $this->load('getFooWithInlineService.php'))); return $instance; [Container%s/getConfiguredServiceService.php] => services['configured_service'] = $instance = new \stdClass(); $a = new \ConfClass(); $a->setFoo(($this->services['baz'] ?? $this->load('getBazService.php'))); $a->configureStdClass($instance); return $instance; [Container%s/getConfiguredServiceSimpleService.php] => services['configured_service_simple'] = $instance = new \stdClass(); (new \ConfClass('bar'))->configureStdClass($instance); return $instance; [Container%s/getDecoratorServiceService.php] => services['decorator_service'] = new \stdClass(); [Container%s/getDecoratorServiceWithNameService.php] => services['decorator_service_with_name'] = new \stdClass(); [Container%s/getDeprecatedServiceService.php] => services['deprecated_service'] = new \stdClass(); [Container%s/getErroredDefinitionService.php] => services['factory_service'] = ($this->services['foo.baz'] ?? $this->load('getFoo_BazService.php'))->getInstance(); [Container%s/getFactoryServiceSimpleService.php] => services['factory_service_simple'] = ($this->privates['factory_simple'] ?? $this->load('getFactorySimpleService.php'))->getInstance(); [Container%s/getFactorySimpleService.php] => privates['factory_simple'] = new \SimpleFactoryClass('foo'); [Container%s/getFooService.php] => services['foo.baz'] ?? $this->load('getFoo_BazService.php')); $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array('bar' => 'foo is bar', 'foobar' => 'bar'), true, $this); $instance->foo = 'bar'; $instance->moo = $a; $instance->qux = array('bar' => 'foo is bar', 'foobar' => 'bar'); $instance->setBar(($this->services['bar'] ?? $this->getBarService())); $instance->initialize(); sc_configure($instance); return $instance; [Container%s/getFoo_BazService.php] => services['foo.baz'] = $instance = \BazClass::getInstance(); \BazClass::configureStatic1($instance); return $instance; [Container%s/getFooBarService.php] => factories['foo_bar'] = function () { // Returns the public 'foo_bar' service. return new \Bar\FooClass(($this->services['deprecated_service'] ?? $this->load('getDeprecatedServiceService.php'))); }; return $this->factories['foo_bar'](); [Container%s/getFooWithInlineService.php] => services['foo_with_inline'] = $instance = new \Foo(); $a = new \Bar(); $a->pub = 'pub'; $a->setBaz(($this->services['baz'] ?? $this->load('getBazService.php'))); $instance->setBar($a); return $instance; [Container%s/getLazyContextService.php] => services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () { yield 'k1' => ($this->services['foo.baz'] ?? $this->load('getFoo_BazService.php')); yield 'k2' => $this; }, 2), new RewindableGenerator(function () { return new \EmptyIterator(); }, 0)); [Container%s/getLazyContextIgnoreInvalidRefService.php] => services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () { yield 0 => ($this->services['foo.baz'] ?? $this->load('getFoo_BazService.php')); }, 1), new RewindableGenerator(function () { return new \EmptyIterator(); }, 0)); [Container%s/getMethodCall1Service.php] => targetDirs[0].'/Fixtures/includes/foo.php'); $this->services['method_call1'] = $instance = new \Bar\FooClass(); $instance->setBar(($this->services['foo'] ?? $this->load('getFooService.php'))); $instance->setBar(NULL); $instance->setBar((($this->services['foo'] ?? $this->load('getFooService.php'))->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default")))); return $instance; [Container%s/getNewFactoryServiceService.php] => foo = 'bar'; $this->services['new_factory_service'] = $instance = $a->getInstance(); $instance->foo = 'bar'; return $instance; [Container%s/getNonSharedFooService.php] => targetDirs[0].'/Fixtures/includes/foo.php'); $this->factories['non_shared_foo'] = function () { return new \Bar\FooClass(); }; return $this->factories['non_shared_foo'](); [Container%s/getRuntimeErrorService.php] => services['runtime_error'] = new \stdClass(($this->privates['errored_definition'] ?? $this->load('getErroredDefinitionService.php'))); [Container%s/getServiceFromStaticMethodService.php] => services['service_from_static_method'] = \Bar\FooClass::getInstance(); [Container%s/getTaggedIteratorService.php] => services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () { yield 0 => ($this->services['foo'] ?? $this->load('getFooService.php')); yield 1 => ($this->privates['tagged_iterator_foo'] ?? $this->privates['tagged_iterator_foo'] = new \Bar()); }, 2)); [Container%s/getTaggedIteratorFooService.php] => privates['tagged_iterator_foo'] = new \Bar(); [Container%s/ProjectServiceContainer.php] => targetDirs[0] = \dirname($containerDir); for ($i = 1; $i <= 5; ++$i) { $this->targetDirs[$i] = $dir = \dirname($dir); } $this->buildParameters = $buildParameters; $this->containerDir = $containerDir; $this->parameters = $this->getDefaultParameters(); $this->services = $this->privates = array(); $this->syntheticIds = array( 'request' => true, ); $this->methodMap = array( 'bar' => 'getBarService', ); $this->fileMap = array( 'BAR' => 'getBAR2Service.php', 'BAR2' => 'getBAR22Service.php', 'bar2' => 'getBar23Service.php', 'baz' => 'getBazService.php', 'configured_service' => 'getConfiguredServiceService.php', 'configured_service_simple' => 'getConfiguredServiceSimpleService.php', 'decorator_service' => 'getDecoratorServiceService.php', 'decorator_service_with_name' => 'getDecoratorServiceWithNameService.php', 'deprecated_service' => 'getDeprecatedServiceService.php', 'factory_service' => 'getFactoryServiceService.php', 'factory_service_simple' => 'getFactoryServiceSimpleService.php', 'foo' => 'getFooService.php', 'foo.baz' => 'getFoo_BazService.php', 'foo_bar' => 'getFooBarService.php', 'foo_with_inline' => 'getFooWithInlineService.php', 'lazy_context' => 'getLazyContextService.php', 'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService.php', 'method_call1' => 'getMethodCall1Service.php', 'new_factory_service' => 'getNewFactoryServiceService.php', 'non_shared_foo' => 'getNonSharedFooService.php', 'runtime_error' => 'getRuntimeErrorService.php', 'service_from_static_method' => 'getServiceFromStaticMethodService.php', 'tagged_iterator' => 'getTaggedIteratorService.php', ); $this->aliases = array( 'alias_for_alias' => 'foo', 'alias_for_foo' => 'foo', 'decorated' => 'decorator_service_with_name', ); } public function reset() { $this->privates = array(); parent::reset(); } public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); } public function isCompiled() { return true; } public function getRemovedIds() { return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php'; } protected function load($file, $lazyLoad = true) { return require $this->containerDir.\DIRECTORY_SEPARATOR.$file; } /** * Gets the public 'bar' shared service. * * @return \Bar\FooClass */ protected function getBarService() { $a = ($this->services['foo.baz'] ?? $this->load('getFoo_BazService.php')); $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar')); $a->configure($instance); return $instance; } public function getParameter($name) { $name = (string) $name; if (isset($this->buildParameters[$name])) { return $this->buildParameters[$name]; } if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) { throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); } if (isset($this->loadedDynamicParameters[$name])) { return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); } return $this->parameters[$name]; } public function hasParameter($name) { $name = (string) $name; if (isset($this->buildParameters[$name])) { return true; } return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters); } public function setParameter($name, $value) { throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); } public function getParameterBag() { if (null === $this->parameterBag) { $parameters = $this->parameters; foreach ($this->loadedDynamicParameters as $name => $loaded) { $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name); } foreach ($this->buildParameters as $name => $value) { $parameters[$name] = $value; } $this->parameterBag = new FrozenParameterBag($parameters); } return $this->parameterBag; } private $loadedDynamicParameters = array(); private $dynamicParameters = array(); /** * Computes a dynamic parameter. * * @param string The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * * @throws InvalidArgumentException When the dynamic parameter does not exist */ private function getDynamicParameter($name) { throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name)); } /** * Gets the default parameters. * * @return array An array of the default parameters */ protected function getDefaultParameters() { return array( 'baz_class' => 'BazClass', 'foo_class' => 'Bar\\FooClass', 'foo' => 'bar', ); } } [ProjectServiceContainer.php] => '%s', 'container.build_id' => '%s', 'container.build_time' => %d, ), __DIR__.\DIRECTORY_SEPARATOR.'Container%s'); )