1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- use Symfony\Component\DependencyInjection\ContainerInterface;
- use Symfony\Component\DependencyInjection\Container;
- use Symfony\Component\DependencyInjection\Reference;
- use Symfony\Component\DependencyInjection\Parameter;
- /**
- * ProjectServiceContainer
- *
- * This class has been auto-generated
- * by the Symfony Dependency Injection Component.
- */
- class ProjectServiceContainer extends Container
- {
- /**
- * Constructor.
- */
- public function __construct()
- {
- $this->parameters = $this->getDefaultParameters();
- $this->services =
- $this->scopedServices =
- $this->scopeStacks = array();
- $this->set('service_container', $this);
- $this->scopes = array();
- $this->scopeChildren = array();
- }
- /**
- * Gets the 'foo' service.
- *
- * This service is shared.
- * This method always returns the same instance of the service.
- *
- * @return FooClass A FooClass instance.
- */
- protected function getFooService()
- {
- $this->services['foo'] = $instance = new \FooClass();
- $instance->setBar('someValue');
- return $instance;
- }
- /**
- * {@inheritdoc}
- */
- public function getParameter($name)
- {
- $name = strtolower($name);
- if (!array_key_exists($name, $this->parameters)) {
- throw new \InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
- }
- return $this->parameters[$name];
- }
- /**
- * {@inheritdoc}
- */
- public function hasParameter($name)
- {
- return array_key_exists(strtolower($name), $this->parameters);
- }
- /**
- * {@inheritdoc}
- */
- public function setParameter($name, $value)
- {
- throw new \LogicException('Impossible to call set() on a frozen ParameterBag.');
- }
- /**
- * Gets the default parameters.
- *
- * @return array An array of the default parameters
- */
- protected function getDefaultParameters()
- {
- return array(
- 'cla' => 'Fo',
- 'ss' => 'Class',
- );
- }
- }
|