3 use Symfony\Component\DependencyInjection\ContainerInterface;
4 use Symfony\Component\DependencyInjection\Container;
5 use Symfony\Component\DependencyInjection\Exception\InactiveScopeException;
6 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
7 use Symfony\Component\DependencyInjection\Exception\LogicException;
8 use Symfony\Component\DependencyInjection\Exception\RuntimeException;
9 use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
12 * ProjectServiceContainer.
14 * This class has been auto-generated
15 * by the Symfony Dependency Injection Component.
17 class ProjectServiceContainer extends Container
20 private $targetDirs = array();
25 public function __construct()
27 $this->parameters = $this->getDefaultParameters();
30 $this->scopedServices =
31 $this->scopeStacks = array();
32 $this->scopes = array();
33 $this->scopeChildren = array();
34 $this->methodMap = array(
35 'test' => 'getTestService',
38 $this->aliases = array();
44 public function compile()
46 throw new LogicException('You cannot compile a dumped frozen container.');
52 public function isFrozen()
58 * Gets the 'test' service.
60 * This service is shared.
61 * This method always returns the same instance of the service.
63 * @return \stdClass A stdClass instance
65 protected function getTestService()
67 return $this->services['test'] = new \stdClass(array('only dot' => '.', 'concatenation as value' => '.\'\'.', 'concatenation from the start value' => '\'\'.', '.' => 'dot as a key', '.\'\'.' => 'concatenation as a key', '\'\'.' => 'concatenation from the start key', 'optimize concatenation' => 'string1-string2', 'optimize concatenation with empty string' => 'string1string2', 'optimize concatenation from the start' => 'start', 'optimize concatenation at the end' => 'end'));
73 public function getParameter($name)
75 $name = strtolower($name);
77 if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) {
78 throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
81 return $this->parameters[$name];
87 public function hasParameter($name)
89 $name = strtolower($name);
91 return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters);
97 public function setParameter($name, $value)
99 throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
105 public function getParameterBag()
107 if (null === $this->parameterBag) {
108 $this->parameterBag = new FrozenParameterBag($this->parameters);
111 return $this->parameterBag;
115 * Gets the default parameters.
117 * @return array An array of the default parameters
119 protected function getDefaultParameters()
123 'some_string' => '-',