3 use Symfony\Component\DependencyInjection\ContainerInterface;
4 use Symfony\Component\DependencyInjection\Container;
5 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
6 use Symfony\Component\DependencyInjection\Exception\LogicException;
7 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
8 use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
11 * ProjectServiceContainer.
13 * This class has been auto-generated
14 * by the Symfony Dependency Injection Component.
16 class ProjectServiceContainer extends Container
19 private $targetDirs = array();
24 public function __construct()
26 parent::__construct(new ParameterBag($this->getDefaultParameters()));
27 $this->methodMap = array(
28 'bar' => 'getBarService',
29 'baz' => 'getBazService',
30 'configurator_service' => 'getConfiguratorServiceService',
31 'configurator_service_simple' => 'getConfiguratorServiceSimpleService',
32 'configured_service' => 'getConfiguredServiceService',
33 'configured_service_simple' => 'getConfiguredServiceSimpleService',
34 'decorated' => 'getDecoratedService',
35 'decorator_service' => 'getDecoratorServiceService',
36 'decorator_service_with_name' => 'getDecoratorServiceWithNameService',
37 'deprecated_service' => 'getDeprecatedServiceService',
38 'factory_service' => 'getFactoryServiceService',
39 'factory_service_simple' => 'getFactoryServiceSimpleService',
40 'factory_simple' => 'getFactorySimpleService',
41 'foo' => 'getFooService',
42 'foo.baz' => 'getFoo_BazService',
43 'foo_bar' => 'getFooBarService',
44 'foo_with_inline' => 'getFooWithInlineService',
45 'inlined' => 'getInlinedService',
46 'method_call1' => 'getMethodCall1Service',
47 'new_factory' => 'getNewFactoryService',
48 'new_factory_service' => 'getNewFactoryServiceService',
49 'request' => 'getRequestService',
50 'service_from_static_method' => 'getServiceFromStaticMethodService',
52 $this->privates = array(
53 'configurator_service' => true,
54 'configurator_service_simple' => true,
55 'factory_simple' => true,
57 'new_factory' => true,
59 $this->aliases = array(
60 'alias_for_alias' => 'foo',
61 'alias_for_foo' => 'foo',
66 * Gets the public 'bar' shared service.
68 * @return \Bar\FooClass
70 protected function getBarService()
72 $a = $this->get('foo.baz');
74 $this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
76 $a->configure($instance);
82 * Gets the public 'baz' shared service.
86 protected function getBazService()
88 $this->services['baz'] = $instance = new \Baz();
90 $instance->setFoo($this->get('foo_with_inline'));
96 * Gets the public 'configured_service' shared service.
100 protected function getConfiguredServiceService()
102 $this->services['configured_service'] = $instance = new \stdClass();
104 ${($_ = isset($this->services['configurator_service']) ? $this->services['configurator_service'] : $this->getConfiguratorServiceService()) && false ?: '_'}->configureStdClass($instance);
110 * Gets the public 'configured_service_simple' shared service.
114 protected function getConfiguredServiceSimpleService()
116 $this->services['configured_service_simple'] = $instance = new \stdClass();
118 ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : $this->getConfiguratorServiceSimpleService()) && false ?: '_'}->configureStdClass($instance);
124 * Gets the public 'decorated' shared service.
128 protected function getDecoratedService()
130 return $this->services['decorated'] = new \stdClass();
134 * Gets the public 'decorator_service' shared service.
138 protected function getDecoratorServiceService()
140 return $this->services['decorator_service'] = new \stdClass();
144 * Gets the public 'decorator_service_with_name' shared service.
148 protected function getDecoratorServiceWithNameService()
150 return $this->services['decorator_service_with_name'] = new \stdClass();
154 * Gets the public 'deprecated_service' shared service.
158 * @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
160 protected function getDeprecatedServiceService()
162 @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
164 return $this->services['deprecated_service'] = new \stdClass();
168 * Gets the public 'factory_service' shared service.
172 protected function getFactoryServiceService()
174 return $this->services['factory_service'] = $this->get('foo.baz')->getInstance();
178 * Gets the public 'factory_service_simple' shared service.
182 protected function getFactoryServiceSimpleService()
184 return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && false ?: '_'}->getInstance();
188 * Gets the public 'foo' shared service.
190 * @return \Bar\FooClass
192 protected function getFooService()
194 $a = $this->get('foo.baz');
196 $this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')), true, $this);
198 $instance->foo = 'bar';
200 $instance->qux = array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo'));
201 $instance->setBar($this->get('bar'));
202 $instance->initialize();
203 sc_configure($instance);
209 * Gets the public 'foo.baz' shared service.
211 * @return object A %baz_class% instance
213 protected function getFoo_BazService()
215 $this->services['foo.baz'] = $instance = call_user_func(array($this->getParameter('baz_class'), 'getInstance'));
217 call_user_func(array($this->getParameter('baz_class'), 'configureStatic1'), $instance);
223 * Gets the public 'foo_bar' service.
225 * @return object A %foo_class% instance
227 protected function getFooBarService()
229 $class = $this->getParameter('foo_class');
235 * Gets the public 'foo_with_inline' shared service.
239 protected function getFooWithInlineService()
241 $this->services['foo_with_inline'] = $instance = new \Foo();
243 $instance->setBar(${($_ = isset($this->services['inlined']) ? $this->services['inlined'] : $this->getInlinedService()) && false ?: '_'});
249 * Gets the public 'method_call1' shared service.
251 * @return \Bar\FooClass
253 protected function getMethodCall1Service()
255 require_once '%path%foo.php';
257 $this->services['method_call1'] = $instance = new \Bar\FooClass();
259 $instance->setBar($this->get('foo'));
260 $instance->setBar($this->get('foo2', ContainerInterface::NULL_ON_INVALID_REFERENCE));
261 if ($this->has('foo3')) {
262 $instance->setBar($this->get('foo3', ContainerInterface::NULL_ON_INVALID_REFERENCE));
264 if ($this->has('foobaz')) {
265 $instance->setBar($this->get('foobaz', ContainerInterface::NULL_ON_INVALID_REFERENCE));
267 $instance->setBar(($this->get('foo')->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
273 * Gets the public 'new_factory_service' shared service.
277 protected function getNewFactoryServiceService()
279 $this->services['new_factory_service'] = $instance = ${($_ = isset($this->services['new_factory']) ? $this->services['new_factory'] : $this->getNewFactoryService()) && false ?: '_'}->getInstance();
281 $instance->foo = 'bar';
287 * Gets the public 'request' shared service.
289 * @throws RuntimeException always since this service is expected to be injected dynamically
291 protected function getRequestService()
293 throw new RuntimeException('You have requested a synthetic service ("request"). The DIC does not know how to construct this service.');
297 * Gets the public 'service_from_static_method' shared service.
299 * @return \Bar\FooClass
301 protected function getServiceFromStaticMethodService()
303 return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
307 * Gets the private 'configurator_service' shared service.
311 protected function getConfiguratorServiceService()
313 $this->services['configurator_service'] = $instance = new \ConfClass();
315 $instance->setFoo($this->get('baz'));
321 * Gets the private 'configurator_service_simple' shared service.
325 protected function getConfiguratorServiceSimpleService()
327 return $this->services['configurator_service_simple'] = new \ConfClass('bar');
331 * Gets the private 'factory_simple' shared service.
333 * @return \SimpleFactoryClass
335 protected function getFactorySimpleService()
337 return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
341 * Gets the private 'inlined' shared service.
345 protected function getInlinedService()
347 $this->services['inlined'] = $instance = new \Bar();
349 $instance->pub = 'pub';
350 $instance->setBaz($this->get('baz'));
356 * Gets the private 'new_factory' shared service.
358 * @return \FactoryClass
360 protected function getNewFactoryService()
362 $this->services['new_factory'] = $instance = new \FactoryClass();
364 $instance->foo = 'bar';
370 * Gets the default parameters.
372 * @return array An array of the default parameters
374 protected function getDefaultParameters()
377 'baz_class' => 'BazClass',
378 'foo_class' => 'Bar\\FooClass',