| @@ 16-122 (lines=107) @@ | ||
| 13 | * This class has been auto-generated |
|
| 14 | * by the Symfony Dependency Injection Component. |
|
| 15 | */ |
|
| 16 | class ResolverTestDebugProjectContainer extends Container |
|
| 17 | { |
|
| 18 | private $parameters; |
|
| 19 | private $targetDirs = array(); |
|
| 20 | ||
| 21 | /** |
|
| 22 | * Constructor. |
|
| 23 | */ |
|
| 24 | public function __construct() |
|
| 25 | { |
|
| 26 | $dir = __DIR__; |
|
| 27 | for ($i = 1; $i <= 5; ++$i) { |
|
| 28 | $this->targetDirs[$i] = $dir = dirname($dir); |
|
| 29 | } |
|
| 30 | $this->parameters = $this->getDefaultParameters(); |
|
| 31 | ||
| 32 | $this->services = array(); |
|
| 33 | ||
| 34 | $this->aliases = array(); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * {@inheritdoc} |
|
| 39 | */ |
|
| 40 | public function compile() |
|
| 41 | { |
|
| 42 | throw new LogicException('You cannot compile a dumped frozen container.'); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * {@inheritdoc} |
|
| 47 | */ |
|
| 48 | public function isFrozen() |
|
| 49 | { |
|
| 50 | return true; |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * {@inheritdoc} |
|
| 55 | */ |
|
| 56 | public function getParameter($name) |
|
| 57 | { |
|
| 58 | $name = strtolower($name); |
|
| 59 | ||
| 60 | if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) { |
|
| 61 | throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); |
|
| 62 | } |
|
| 63 | ||
| 64 | return $this->parameters[$name]; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * {@inheritdoc} |
|
| 69 | */ |
|
| 70 | public function hasParameter($name) |
|
| 71 | { |
|
| 72 | $name = strtolower($name); |
|
| 73 | ||
| 74 | return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * {@inheritdoc} |
|
| 79 | */ |
|
| 80 | public function setParameter($name, $value) |
|
| 81 | { |
|
| 82 | throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * {@inheritdoc} |
|
| 87 | */ |
|
| 88 | public function getParameterBag() |
|
| 89 | { |
|
| 90 | if (null === $this->parameterBag) { |
|
| 91 | $this->parameterBag = new FrozenParameterBag($this->parameters); |
|
| 92 | } |
|
| 93 | ||
| 94 | return $this->parameterBag; |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Gets the default parameters. |
|
| 99 | * |
|
| 100 | * @return array An array of the default parameters |
|
| 101 | */ |
|
| 102 | protected function getDefaultParameters() |
|
| 103 | { |
|
| 104 | return array( |
|
| 105 | 'kernel.root_dir' => $this->targetDirs[2], |
|
| 106 | 'kernel.environment' => 'test', |
|
| 107 | 'kernel.debug' => true, |
|
| 108 | 'kernel.name' => 'Resolver', |
|
| 109 | 'kernel.cache_dir' => __DIR__, |
|
| 110 | 'kernel.logs_dir' => ($this->targetDirs[2].'/logs'), |
|
| 111 | 'kernel.bundles' => array( |
|
| 112 | 'ABundle' => 'Hautelook\\AliceBundle\\Resolver\\ABundle', |
|
| 113 | 'BBundle' => 'Hautelook\\AliceBundle\\Resolver\\BBundle', |
|
| 114 | ), |
|
| 115 | 'kernel.charset' => 'UTF-8', |
|
| 116 | 'kernel.container_class' => 'ResolverTestDebugProjectContainer', |
|
| 117 | 'database.name' => 'alice', |
|
| 118 | 'database.user' => 'root', |
|
| 119 | 'database.password' => '', |
|
| 120 | ); |
|
| 121 | } |
|
| 122 | } |
|
| 123 | ||
| @@ 16-122 (lines=107) @@ | ||
| 13 | * This class has been auto-generated |
|
| 14 | * by the Symfony Dependency Injection Component. |
|
| 15 | */ |
|
| 16 | class ResolverTestCanResolveBundlesDebugProjectContainer extends Container |
|
| 17 | { |
|
| 18 | private $parameters; |
|
| 19 | private $targetDirs = array(); |
|
| 20 | ||
| 21 | /** |
|
| 22 | * Constructor. |
|
| 23 | */ |
|
| 24 | public function __construct() |
|
| 25 | { |
|
| 26 | $dir = __DIR__; |
|
| 27 | for ($i = 1; $i <= 5; ++$i) { |
|
| 28 | $this->targetDirs[$i] = $dir = dirname($dir); |
|
| 29 | } |
|
| 30 | $this->parameters = $this->getDefaultParameters(); |
|
| 31 | ||
| 32 | $this->services = array(); |
|
| 33 | ||
| 34 | $this->aliases = array(); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * {@inheritdoc} |
|
| 39 | */ |
|
| 40 | public function compile() |
|
| 41 | { |
|
| 42 | throw new LogicException('You cannot compile a dumped frozen container.'); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * {@inheritdoc} |
|
| 47 | */ |
|
| 48 | public function isFrozen() |
|
| 49 | { |
|
| 50 | return true; |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * {@inheritdoc} |
|
| 55 | */ |
|
| 56 | public function getParameter($name) |
|
| 57 | { |
|
| 58 | $name = strtolower($name); |
|
| 59 | ||
| 60 | if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) { |
|
| 61 | throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); |
|
| 62 | } |
|
| 63 | ||
| 64 | return $this->parameters[$name]; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * {@inheritdoc} |
|
| 69 | */ |
|
| 70 | public function hasParameter($name) |
|
| 71 | { |
|
| 72 | $name = strtolower($name); |
|
| 73 | ||
| 74 | return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * {@inheritdoc} |
|
| 79 | */ |
|
| 80 | public function setParameter($name, $value) |
|
| 81 | { |
|
| 82 | throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * {@inheritdoc} |
|
| 87 | */ |
|
| 88 | public function getParameterBag() |
|
| 89 | { |
|
| 90 | if (null === $this->parameterBag) { |
|
| 91 | $this->parameterBag = new FrozenParameterBag($this->parameters); |
|
| 92 | } |
|
| 93 | ||
| 94 | return $this->parameterBag; |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Gets the default parameters. |
|
| 99 | * |
|
| 100 | * @return array An array of the default parameters |
|
| 101 | */ |
|
| 102 | protected function getDefaultParameters() |
|
| 103 | { |
|
| 104 | return array( |
|
| 105 | 'kernel.root_dir' => $this->targetDirs[2], |
|
| 106 | 'kernel.environment' => 'testCanResolveBundles', |
|
| 107 | 'kernel.debug' => true, |
|
| 108 | 'kernel.name' => 'Resolver', |
|
| 109 | 'kernel.cache_dir' => __DIR__, |
|
| 110 | 'kernel.logs_dir' => ($this->targetDirs[2].'/logs'), |
|
| 111 | 'kernel.bundles' => array( |
|
| 112 | 'ABundle' => 'Hautelook\\AliceBundle\\Resolver\\ABundle', |
|
| 113 | 'BBundle' => 'Hautelook\\AliceBundle\\Resolver\\BBundle', |
|
| 114 | ), |
|
| 115 | 'kernel.charset' => 'UTF-8', |
|
| 116 | 'kernel.container_class' => 'ResolverTestCanResolveBundlesDebugProjectContainer', |
|
| 117 | 'database.name' => 'alice', |
|
| 118 | 'database.user' => 'root', |
|
| 119 | 'database.password' => '', |
|
| 120 | ); |
|
| 121 | } |
|
| 122 | } |
|
| 123 | ||
| @@ 16-122 (lines=107) @@ | ||
| 13 | * This class has been auto-generated |
|
| 14 | * by the Symfony Dependency Injection Component. |
|
| 15 | */ |
|
| 16 | class ResolverTestReturnsAllBundlesIfNoBundleIsRequestedDebugProjectContainer extends Container |
|
| 17 | { |
|
| 18 | private $parameters; |
|
| 19 | private $targetDirs = array(); |
|
| 20 | ||
| 21 | /** |
|
| 22 | * Constructor. |
|
| 23 | */ |
|
| 24 | public function __construct() |
|
| 25 | { |
|
| 26 | $dir = __DIR__; |
|
| 27 | for ($i = 1; $i <= 5; ++$i) { |
|
| 28 | $this->targetDirs[$i] = $dir = dirname($dir); |
|
| 29 | } |
|
| 30 | $this->parameters = $this->getDefaultParameters(); |
|
| 31 | ||
| 32 | $this->services = array(); |
|
| 33 | ||
| 34 | $this->aliases = array(); |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * {@inheritdoc} |
|
| 39 | */ |
|
| 40 | public function compile() |
|
| 41 | { |
|
| 42 | throw new LogicException('You cannot compile a dumped frozen container.'); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * {@inheritdoc} |
|
| 47 | */ |
|
| 48 | public function isFrozen() |
|
| 49 | { |
|
| 50 | return true; |
|
| 51 | } |
|
| 52 | ||
| 53 | /** |
|
| 54 | * {@inheritdoc} |
|
| 55 | */ |
|
| 56 | public function getParameter($name) |
|
| 57 | { |
|
| 58 | $name = strtolower($name); |
|
| 59 | ||
| 60 | if (!(isset($this->parameters[$name]) || array_key_exists($name, $this->parameters))) { |
|
| 61 | throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name)); |
|
| 62 | } |
|
| 63 | ||
| 64 | return $this->parameters[$name]; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * {@inheritdoc} |
|
| 69 | */ |
|
| 70 | public function hasParameter($name) |
|
| 71 | { |
|
| 72 | $name = strtolower($name); |
|
| 73 | ||
| 74 | return isset($this->parameters[$name]) || array_key_exists($name, $this->parameters); |
|
| 75 | } |
|
| 76 | ||
| 77 | /** |
|
| 78 | * {@inheritdoc} |
|
| 79 | */ |
|
| 80 | public function setParameter($name, $value) |
|
| 81 | { |
|
| 82 | throw new LogicException('Impossible to call set() on a frozen ParameterBag.'); |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * {@inheritdoc} |
|
| 87 | */ |
|
| 88 | public function getParameterBag() |
|
| 89 | { |
|
| 90 | if (null === $this->parameterBag) { |
|
| 91 | $this->parameterBag = new FrozenParameterBag($this->parameters); |
|
| 92 | } |
|
| 93 | ||
| 94 | return $this->parameterBag; |
|
| 95 | } |
|
| 96 | ||
| 97 | /** |
|
| 98 | * Gets the default parameters. |
|
| 99 | * |
|
| 100 | * @return array An array of the default parameters |
|
| 101 | */ |
|
| 102 | protected function getDefaultParameters() |
|
| 103 | { |
|
| 104 | return array( |
|
| 105 | 'kernel.root_dir' => $this->targetDirs[2], |
|
| 106 | 'kernel.environment' => 'testReturnsAllBundlesIfNoBundleIsRequested', |
|
| 107 | 'kernel.debug' => true, |
|
| 108 | 'kernel.name' => 'Resolver', |
|
| 109 | 'kernel.cache_dir' => __DIR__, |
|
| 110 | 'kernel.logs_dir' => ($this->targetDirs[2].'/logs'), |
|
| 111 | 'kernel.bundles' => array( |
|
| 112 | 'ABundle' => 'Hautelook\\AliceBundle\\Resolver\\ABundle', |
|
| 113 | 'BBundle' => 'Hautelook\\AliceBundle\\Resolver\\BBundle', |
|
| 114 | ), |
|
| 115 | 'kernel.charset' => 'UTF-8', |
|
| 116 | 'kernel.container_class' => 'ResolverTestReturnsAllBundlesIfNoBundleIsRequestedDebugProjectContainer', |
|
| 117 | 'database.name' => 'alice', |
|
| 118 | 'database.user' => 'root', |
|
| 119 | 'database.password' => '', |
|
| 120 | ); |
|
| 121 | } |
|
| 122 | } |
|
| 123 | ||