Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Container;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithoutArgumentsContainer
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->parameterBag = null;
|
||||
|
||||
$this->services = array();
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Container;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithMandatoryArgumentsContainer
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
<?php
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Container;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithOptionalArgumentsContainer
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->parameterBag = null;
|
||||
|
||||
$this->services = array();
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures\Container;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tests\Fixtures\Container\NoConstructorContainer
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
3
vendor/symfony/dependency-injection/Tests/Fixtures/php/php_with_wrong_ext.yml
vendored
Normal file
3
vendor/symfony/dependency-injection/Tests/Fixtures/php/php_with_wrong_ext.yml
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
$container->setParameter('with_wrong_ext', 'from php');
|
55
vendor/symfony/dependency-injection/Tests/Fixtures/php/services1-1.php
vendored
Normal file
55
vendor/symfony/dependency-injection/Tests/Fixtures/php/services1-1.php
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace Symfony\Component\DependencyInjection\Dump;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Container extends \Symfony\Component\DependencyInjection\Dump\AbstractContainer
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
53
vendor/symfony/dependency-injection/Tests/Fixtures/php/services1.php
vendored
Normal file
53
vendor/symfony/dependency-injection/Tests/Fixtures/php/services1.php
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
157
vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php
vendored
Normal file
157
vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php
vendored
Normal file
|
@ -0,0 +1,157 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'test' => 'getTestService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'test' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getTestService()
|
||||
{
|
||||
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', 'new line' => 'string with '."\n".'new line'));
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$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));
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'empty_value' => '',
|
||||
'some_string' => '-',
|
||||
);
|
||||
}
|
||||
}
|
171
vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php
vendored
Normal file
171
vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php
vendored
Normal file
|
@ -0,0 +1,171 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$dir = __DIR__;
|
||||
for ($i = 1; $i <= 5; ++$i) {
|
||||
$this->targetDirs[$i] = $dir = \dirname($dir);
|
||||
}
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'test' => 'getTestService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'test' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getTestService()
|
||||
{
|
||||
return $this->services['test'] = new \stdClass(('wiz'.$this->targetDirs[1]), array(('wiz'.$this->targetDirs[1]) => ($this->targetDirs[2].'/')));
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$this->parameterBag = new FrozenParameterBag($parameters);
|
||||
}
|
||||
|
||||
return $this->parameterBag;
|
||||
}
|
||||
|
||||
private $loadedDynamicParameters = array(
|
||||
'foo' => false,
|
||||
'buz' => false,
|
||||
);
|
||||
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)
|
||||
{
|
||||
switch ($name) {
|
||||
case 'foo': $value = ('wiz'.$this->targetDirs[1]); break;
|
||||
case 'buz': $value = $this->targetDirs[2]; break;
|
||||
default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
|
||||
}
|
||||
$this->loadedDynamicParameters[$name] = true;
|
||||
|
||||
return $this->dynamicParameters[$name] = $value;
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'bar' => __DIR__,
|
||||
'baz' => (__DIR__.'/PhpDumperTest.php'),
|
||||
);
|
||||
}
|
||||
}
|
70
vendor/symfony/dependency-injection/Tests/Fixtures/php/services13.php
vendored
Normal file
70
vendor/symfony/dependency-injection/Tests/Fixtures/php/services13.php
vendored
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'foo' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
$a = new \stdClass();
|
||||
$a->add($this);
|
||||
|
||||
return $this->services['bar'] = new \stdClass($a);
|
||||
}
|
||||
}
|
181
vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php
vendored
Normal file
181
vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php
vendored
Normal file
|
@ -0,0 +1,181 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'service_from_anonymous_factory' => 'getServiceFromAnonymousFactoryService',
|
||||
'service_with_method_call_and_factory' => 'getServiceWithMethodCallAndFactoryService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'service_from_anonymous_factory' shared service.
|
||||
*
|
||||
* @return object A %env(FOO)% instance
|
||||
*/
|
||||
protected function getServiceFromAnonymousFactoryService()
|
||||
{
|
||||
return $this->services['service_from_anonymous_factory'] = (new ${($_ = $this->getEnv('FOO')) && false ?: "_"}())->getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'service_with_method_call_and_factory' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getServiceWithMethodCallAndFactoryService()
|
||||
{
|
||||
$this->services['service_with_method_call_and_factory'] = $instance = new \Bar\FooClass();
|
||||
|
||||
$instance->setBar(\Bar\FooClass::getInstance());
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$this->parameterBag = new FrozenParameterBag($parameters);
|
||||
}
|
||||
|
||||
return $this->parameterBag;
|
||||
}
|
||||
|
||||
private $loadedDynamicParameters = array(
|
||||
'foo' => false,
|
||||
);
|
||||
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)
|
||||
{
|
||||
switch ($name) {
|
||||
case 'foo': $value = $this->getEnv('FOO'); break;
|
||||
default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
|
||||
}
|
||||
$this->loadedDynamicParameters[$name] = true;
|
||||
|
||||
return $this->dynamicParameters[$name] = $value;
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array(
|
||||
'env(foo)' => 'env(FOO)',
|
||||
);
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'env(FOO)' => 'Bar\\FaooClass',
|
||||
);
|
||||
}
|
||||
}
|
66
vendor/symfony/dependency-injection/Tests/Fixtures/php/services24.php
vendored
Normal file
66
vendor/symfony/dependency-injection/Tests/Fixtures/php/services24.php
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'foo' => 'getFooService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo' shared autowired service.
|
||||
*
|
||||
* @return \Foo
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
return $this->services['foo'] = new \Foo();
|
||||
}
|
||||
}
|
194
vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php
vendored
Normal file
194
vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php
vendored
Normal file
|
@ -0,0 +1,194 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$dir = __DIR__;
|
||||
for ($i = 1; $i <= 5; ++$i) {
|
||||
$this->targetDirs[$i] = $dir = \dirname($dir);
|
||||
}
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'test' => 'getTestService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\Bar
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
return $this->services['bar'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\Bar($this->getEnv('QUZ'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'test' shared service.
|
||||
*
|
||||
* @return object A %env(FOO)% instance
|
||||
*/
|
||||
protected function getTestService()
|
||||
{
|
||||
$class = $this->getEnv('FOO');
|
||||
|
||||
return $this->services['test'] = new $class($this->getEnv('Bar'), 'foo'.$this->getEnv('string:FOO').'baz', $this->getEnv('int:Baz'));
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$this->parameterBag = new FrozenParameterBag($parameters);
|
||||
}
|
||||
|
||||
return $this->parameterBag;
|
||||
}
|
||||
|
||||
private $loadedDynamicParameters = array(
|
||||
'bar' => false,
|
||||
'baz' => false,
|
||||
'json' => false,
|
||||
'db_dsn' => false,
|
||||
'env(json_file)' => false,
|
||||
);
|
||||
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)
|
||||
{
|
||||
switch ($name) {
|
||||
case 'bar': $value = $this->getEnv('FOO'); break;
|
||||
case 'baz': $value = $this->getEnv('int:Baz'); break;
|
||||
case 'json': $value = $this->getEnv('json:file:json_file'); break;
|
||||
case 'db_dsn': $value = $this->getEnv('resolve:DB'); break;
|
||||
case 'env(json_file)': $value = ($this->targetDirs[1].'/array.json'); break;
|
||||
default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
|
||||
}
|
||||
$this->loadedDynamicParameters[$name] = true;
|
||||
|
||||
return $this->dynamicParameters[$name] = $value;
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array(
|
||||
'env(foo)' => 'env(FOO)',
|
||||
'env(db)' => 'env(DB)',
|
||||
);
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'project_dir' => '/foo/bar',
|
||||
'env(FOO)' => 'foo',
|
||||
'env(DB)' => 'sqlite://%project_dir%/var/data.db',
|
||||
);
|
||||
}
|
||||
}
|
81
vendor/symfony/dependency-injection/Tests/Fixtures/php/services33.php
vendored
Normal file
81
vendor/symfony/dependency-injection/Tests/Fixtures/php/services33.php
vendored
Normal file
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->normalizedIds = array(
|
||||
'bar\\foo' => 'Bar\\Foo',
|
||||
'foo\\foo' => 'Foo\\Foo',
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'Bar\\Foo' => 'getFooService',
|
||||
'Foo\\Foo' => 'getFoo2Service',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Bar\Foo' shared service.
|
||||
*
|
||||
* @return \Bar\Foo
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
return $this->services['Bar\Foo'] = new \Bar\Foo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Foo\Foo' shared service.
|
||||
*
|
||||
* @return \Foo\Foo
|
||||
*/
|
||||
protected function getFoo2Service()
|
||||
{
|
||||
return $this->services['Foo\Foo'] = new \Foo\Foo();
|
||||
}
|
||||
}
|
156
vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php
vendored
Normal file
156
vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php
vendored
Normal file
|
@ -0,0 +1,156 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$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));
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'foo' => 'bar',
|
||||
'baz' => 'bar',
|
||||
'bar' => 'foo is %foo bar',
|
||||
'escape' => '@escapeme',
|
||||
'values' => array(
|
||||
0 => true,
|
||||
1 => false,
|
||||
2 => NULL,
|
||||
3 => 0,
|
||||
4 => 1000.3,
|
||||
5 => 'true',
|
||||
6 => 'false',
|
||||
7 => 'null',
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
443
vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php
vendored
Normal file
443
vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php
vendored
Normal file
|
@ -0,0 +1,443 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(new ParameterBag($this->getDefaultParameters()));
|
||||
$this->normalizedIds = array(
|
||||
'psr\\container\\containerinterface' => 'Psr\\Container\\ContainerInterface',
|
||||
'symfony\\component\\dependencyinjection\\containerinterface' => 'Symfony\\Component\\DependencyInjection\\ContainerInterface',
|
||||
);
|
||||
$this->syntheticIds = array(
|
||||
'request' => true,
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'baz' => 'getBazService',
|
||||
'configurator_service' => 'getConfiguratorServiceService',
|
||||
'configurator_service_simple' => 'getConfiguratorServiceSimpleService',
|
||||
'configured_service' => 'getConfiguredServiceService',
|
||||
'configured_service_simple' => 'getConfiguredServiceSimpleService',
|
||||
'decorated' => 'getDecoratedService',
|
||||
'decorator_service' => 'getDecoratorServiceService',
|
||||
'decorator_service_with_name' => 'getDecoratorServiceWithNameService',
|
||||
'deprecated_service' => 'getDeprecatedServiceService',
|
||||
'factory_service' => 'getFactoryServiceService',
|
||||
'factory_service_simple' => 'getFactoryServiceSimpleService',
|
||||
'factory_simple' => 'getFactorySimpleService',
|
||||
'foo' => 'getFooService',
|
||||
'foo.baz' => 'getFoo_BazService',
|
||||
'foo_bar' => 'getFooBarService',
|
||||
'foo_with_inline' => 'getFooWithInlineService',
|
||||
'inlined' => 'getInlinedService',
|
||||
'lazy_context' => 'getLazyContextService',
|
||||
'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService',
|
||||
'method_call1' => 'getMethodCall1Service',
|
||||
'new_factory' => 'getNewFactoryService',
|
||||
'new_factory_service' => 'getNewFactoryServiceService',
|
||||
'service_from_static_method' => 'getServiceFromStaticMethodService',
|
||||
'tagged_iterator' => 'getTaggedIteratorService',
|
||||
'tagged_iterator_foo' => 'getTaggedIteratorFooService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'configurator_service' => true,
|
||||
'configurator_service_simple' => true,
|
||||
'factory_simple' => true,
|
||||
'inlined' => true,
|
||||
'new_factory' => true,
|
||||
'tagged_iterator_foo' => true,
|
||||
);
|
||||
$this->aliases = array(
|
||||
'Psr\\Container\\ContainerInterface' => 'service_container',
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => 'service_container',
|
||||
'alias_for_alias' => 'foo',
|
||||
'alias_for_foo' => 'foo',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
|
||||
|
||||
$this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
|
||||
|
||||
$a->configure($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'baz' shared service.
|
||||
*
|
||||
* @return \Baz
|
||||
*/
|
||||
protected function getBazService()
|
||||
{
|
||||
$this->services['baz'] = $instance = new \Baz();
|
||||
|
||||
$instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->getFooWithInlineService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'configured_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getConfiguredServiceService()
|
||||
{
|
||||
$this->services['configured_service'] = $instance = new \stdClass();
|
||||
|
||||
${($_ = isset($this->services['configurator_service']) ? $this->services['configurator_service'] : $this->getConfiguratorServiceService()) && false ?: '_'}->configureStdClass($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'configured_service_simple' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getConfiguredServiceSimpleService()
|
||||
{
|
||||
$this->services['configured_service_simple'] = $instance = new \stdClass();
|
||||
|
||||
${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : $this->services['configurator_service_simple'] = new \ConfClass('bar')) && false ?: '_'}->configureStdClass($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'decorated' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getDecoratedService()
|
||||
{
|
||||
return $this->services['decorated'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'decorator_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getDecoratorServiceService()
|
||||
{
|
||||
return $this->services['decorator_service'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'decorator_service_with_name' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getDecoratorServiceWithNameService()
|
||||
{
|
||||
return $this->services['decorator_service_with_name'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'deprecated_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*
|
||||
* @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
|
||||
*/
|
||||
protected function getDeprecatedServiceService()
|
||||
{
|
||||
@trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['deprecated_service'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'factory_service' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getFactoryServiceService()
|
||||
{
|
||||
return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'}->getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'factory_service_simple' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getFactoryServiceSimpleService()
|
||||
{
|
||||
return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && false ?: '_'}->getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
|
||||
|
||||
$this->services['foo'] = $instance = \Bar\FooClass::getInstance('foo', $a, array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo')), true, $this);
|
||||
|
||||
$instance->foo = 'bar';
|
||||
$instance->moo = $a;
|
||||
$instance->qux = array($this->getParameter('foo') => 'foo is '.$this->getParameter('foo').'', 'foobar' => $this->getParameter('foo'));
|
||||
$instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'});
|
||||
$instance->initialize();
|
||||
sc_configure($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo.baz' shared service.
|
||||
*
|
||||
* @return object A %baz_class% instance
|
||||
*/
|
||||
protected function getFoo_BazService()
|
||||
{
|
||||
$this->services['foo.baz'] = $instance = \call_user_func(array($this->getParameter('baz_class'), 'getInstance'));
|
||||
|
||||
\call_user_func(array($this->getParameter('baz_class'), 'configureStatic1'), $instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo_bar' service.
|
||||
*
|
||||
* @return object A %foo_class% instance
|
||||
*/
|
||||
protected function getFooBarService()
|
||||
{
|
||||
$class = $this->getParameter('foo_class');
|
||||
|
||||
return new $class(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->getDeprecatedServiceService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo_with_inline' shared service.
|
||||
*
|
||||
* @return \Foo
|
||||
*/
|
||||
protected function getFooWithInlineService()
|
||||
{
|
||||
$this->services['foo_with_inline'] = $instance = new \Foo();
|
||||
|
||||
$instance->setBar(${($_ = isset($this->services['inlined']) ? $this->services['inlined'] : $this->getInlinedService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'lazy_context' shared service.
|
||||
*
|
||||
* @return \LazyContext
|
||||
*/
|
||||
protected function getLazyContextService()
|
||||
{
|
||||
return $this->services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () {
|
||||
yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
|
||||
yield 'k2' => $this;
|
||||
}, 2), new RewindableGenerator(function () {
|
||||
return new \EmptyIterator();
|
||||
}, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'lazy_context_ignore_invalid_ref' shared service.
|
||||
*
|
||||
* @return \LazyContext
|
||||
*/
|
||||
protected function getLazyContextIgnoreInvalidRefService()
|
||||
{
|
||||
return $this->services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () {
|
||||
yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
|
||||
if ($this->has('invalid')) {
|
||||
yield 1 => ${($_ = isset($this->services['invalid']) ? $this->services['invalid'] : $this->get('invalid', /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ 2)) && false ?: '_'};
|
||||
}
|
||||
}, function () {
|
||||
return 1 + (int) ($this->has('invalid'));
|
||||
}), new RewindableGenerator(function () {
|
||||
return new \EmptyIterator();
|
||||
}, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'method_call1' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getMethodCall1Service()
|
||||
{
|
||||
include_once '%path%foo.php';
|
||||
|
||||
$this->services['method_call1'] = $instance = new \Bar\FooClass();
|
||||
|
||||
$instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
|
||||
$instance->setBar(${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->get('foo2', /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ 2)) && false ?: '_'});
|
||||
if ($this->has('foo3')) {
|
||||
$instance->setBar(${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : $this->get('foo3', /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ 2)) && false ?: '_'});
|
||||
}
|
||||
if ($this->has('foobaz')) {
|
||||
$instance->setBar(${($_ = isset($this->services['foobaz']) ? $this->services['foobaz'] : $this->get('foobaz', /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ 2)) && false ?: '_'});
|
||||
}
|
||||
$instance->setBar((${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'new_factory_service' shared service.
|
||||
*
|
||||
* @return \FooBarBaz
|
||||
*/
|
||||
protected function getNewFactoryServiceService()
|
||||
{
|
||||
$this->services['new_factory_service'] = $instance = ${($_ = isset($this->services['new_factory']) ? $this->services['new_factory'] : $this->getNewFactoryService()) && false ?: '_'}->getInstance();
|
||||
|
||||
$instance->foo = 'bar';
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'service_from_static_method' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getServiceFromStaticMethodService()
|
||||
{
|
||||
return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'tagged_iterator' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getTaggedIteratorService()
|
||||
{
|
||||
return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
|
||||
return new \EmptyIterator();
|
||||
}, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'configurator_service' shared service.
|
||||
*
|
||||
* @return \ConfClass
|
||||
*/
|
||||
protected function getConfiguratorServiceService()
|
||||
{
|
||||
$this->services['configurator_service'] = $instance = new \ConfClass();
|
||||
|
||||
$instance->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'configurator_service_simple' shared service.
|
||||
*
|
||||
* @return \ConfClass
|
||||
*/
|
||||
protected function getConfiguratorServiceSimpleService()
|
||||
{
|
||||
return $this->services['configurator_service_simple'] = new \ConfClass('bar');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'factory_simple' shared service.
|
||||
*
|
||||
* @return \SimpleFactoryClass
|
||||
*
|
||||
* @deprecated The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.
|
||||
*/
|
||||
protected function getFactorySimpleService()
|
||||
{
|
||||
@trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'inlined' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getInlinedService()
|
||||
{
|
||||
$this->services['inlined'] = $instance = new \Bar();
|
||||
|
||||
$instance->pub = 'pub';
|
||||
$instance->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'new_factory' shared service.
|
||||
*
|
||||
* @return \FactoryClass
|
||||
*/
|
||||
protected function getNewFactoryService()
|
||||
{
|
||||
$this->services['new_factory'] = $instance = new \FactoryClass();
|
||||
|
||||
$instance->foo = 'bar';
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'tagged_iterator_foo' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getTaggedIteratorFooService()
|
||||
{
|
||||
return $this->services['tagged_iterator_foo'] = new \Bar();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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',
|
||||
);
|
||||
}
|
||||
}
|
509
vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_as_files.txt
vendored
Normal file
509
vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_as_files.txt
vendored
Normal file
|
@ -0,0 +1,509 @@
|
|||
Array
|
||||
(
|
||||
[Container%s/removed-ids.php] => <?php
|
||||
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'configurator_service' => true,
|
||||
'configurator_service_simple' => true,
|
||||
'decorated.pif-pouf' => true,
|
||||
'decorator_service.inner' => true,
|
||||
'factory_simple' => true,
|
||||
'inlined' => true,
|
||||
'new_factory' => true,
|
||||
'tagged_iterator_foo' => true,
|
||||
);
|
||||
|
||||
[Container%s/getBazService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'baz' shared service.
|
||||
|
||||
$this->services['baz'] = $instance = new \Baz();
|
||||
|
||||
$instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->load('getFooWithInlineService.php')) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
|
||||
[Container%s/getConfiguredServiceService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'configured_service' shared service.
|
||||
|
||||
$this->services['configured_service'] = $instance = new \stdClass();
|
||||
|
||||
$a = new \ConfClass();
|
||||
$a->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'});
|
||||
|
||||
$a->configureStdClass($instance);
|
||||
|
||||
return $instance;
|
||||
|
||||
[Container%s/getConfiguredServiceSimpleService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'configured_service_simple' shared service.
|
||||
|
||||
$this->services['configured_service_simple'] = $instance = new \stdClass();
|
||||
|
||||
(new \ConfClass('bar'))->configureStdClass($instance);
|
||||
|
||||
return $instance;
|
||||
|
||||
[Container%s/getDecoratorServiceService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'decorator_service' shared service.
|
||||
|
||||
return $this->services['decorator_service'] = new \stdClass();
|
||||
|
||||
[Container%s/getDecoratorServiceWithNameService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'decorator_service_with_name' shared service.
|
||||
|
||||
return $this->services['decorator_service_with_name'] = new \stdClass();
|
||||
|
||||
[Container%s/getDeprecatedServiceService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'deprecated_service' shared service.
|
||||
|
||||
@trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['deprecated_service'] = new \stdClass();
|
||||
|
||||
[Container%s/getFactoryServiceService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'factory_service' shared service.
|
||||
|
||||
return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'}->getInstance();
|
||||
|
||||
[Container%s/getFactoryServiceSimpleService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'factory_service_simple' shared service.
|
||||
|
||||
return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->load('getFactorySimpleService.php')) && false ?: '_'}->getInstance();
|
||||
|
||||
[Container%s/getFactorySimpleService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the private 'factory_simple' shared service.
|
||||
|
||||
@trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
|
||||
|
||||
[Container%s/getFooService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'foo' shared service.
|
||||
|
||||
$a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
|
||||
|
||||
$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(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'});
|
||||
$instance->initialize();
|
||||
sc_configure($instance);
|
||||
|
||||
return $instance;
|
||||
|
||||
[Container%s/getFoo_BazService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'foo.baz' shared service.
|
||||
|
||||
$this->services['foo.baz'] = $instance = \BazClass::getInstance();
|
||||
|
||||
\BazClass::configureStatic1($instance);
|
||||
|
||||
return $instance;
|
||||
|
||||
[Container%s/getFooWithInlineService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'foo_with_inline' shared service.
|
||||
|
||||
$this->services['foo_with_inline'] = $instance = new \Foo();
|
||||
|
||||
$a = new \Bar();
|
||||
|
||||
$a->pub = 'pub';
|
||||
$a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'});
|
||||
|
||||
$instance->setBar($a);
|
||||
|
||||
return $instance;
|
||||
|
||||
[Container%s/getLazyContextService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'lazy_context' shared service.
|
||||
|
||||
return $this->services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () {
|
||||
yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
|
||||
yield 'k2' => $this;
|
||||
}, 2), new RewindableGenerator(function () {
|
||||
return new \EmptyIterator();
|
||||
}, 0));
|
||||
|
||||
[Container%s/getLazyContextIgnoreInvalidRefService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'lazy_context_ignore_invalid_ref' shared service.
|
||||
|
||||
return $this->services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () {
|
||||
yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
|
||||
}, 1), new RewindableGenerator(function () {
|
||||
return new \EmptyIterator();
|
||||
}, 0));
|
||||
|
||||
[Container%s/getMethodCall1Service.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'method_call1' shared service.
|
||||
|
||||
include_once ($this->targetDirs[0].'/Fixtures/includes/foo.php');
|
||||
|
||||
$this->services['method_call1'] = $instance = new \Bar\FooClass();
|
||||
|
||||
$instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'});
|
||||
$instance->setBar(NULL);
|
||||
$instance->setBar((${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'}->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
|
||||
|
||||
return $instance;
|
||||
|
||||
[Container%s/getNewFactoryServiceService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'new_factory_service' shared service.
|
||||
|
||||
$a = new \FactoryClass();
|
||||
$a->foo = 'bar';
|
||||
|
||||
$this->services['new_factory_service'] = $instance = $a->getInstance();
|
||||
|
||||
$instance->foo = 'bar';
|
||||
|
||||
return $instance;
|
||||
|
||||
[Container%s/getServiceFromStaticMethodService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'service_from_static_method' shared service.
|
||||
|
||||
return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
|
||||
|
||||
[Container%s/getTaggedIteratorService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the public 'tagged_iterator' shared service.
|
||||
|
||||
return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
|
||||
yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'};
|
||||
yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'};
|
||||
}, 2));
|
||||
|
||||
[Container%s/getTaggedIteratorFooService.php] => <?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
// Returns the private 'tagged_iterator_foo' shared service.
|
||||
|
||||
return $this->services['tagged_iterator_foo'] = new \Bar();
|
||||
|
||||
[Container%s/ProjectServiceContainer.php] => <?php
|
||||
|
||||
namespace Container%s;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $buildParameters;
|
||||
private $containerDir;
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct(array $buildParameters = array(), $containerDir = __DIR__)
|
||||
{
|
||||
$dir = $this->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 = array();
|
||||
$this->syntheticIds = array(
|
||||
'request' => true,
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'foo_bar' => 'getFooBarService',
|
||||
);
|
||||
$this->fileMap = array(
|
||||
'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',
|
||||
'factory_simple' => 'getFactorySimpleService.php',
|
||||
'foo' => 'getFooService.php',
|
||||
'foo.baz' => 'getFoo_BazService.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',
|
||||
'service_from_static_method' => 'getServiceFromStaticMethodService.php',
|
||||
'tagged_iterator' => 'getTaggedIteratorService.php',
|
||||
'tagged_iterator_foo' => 'getTaggedIteratorFooService.php',
|
||||
);
|
||||
$this->privates = array(
|
||||
'factory_simple' => true,
|
||||
'tagged_iterator_foo' => true,
|
||||
);
|
||||
$this->aliases = array(
|
||||
'alias_for_alias' => 'foo',
|
||||
'alias_for_foo' => 'foo',
|
||||
'decorated' => 'decorator_service_with_name',
|
||||
);
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return require $this->containerDir.\DIRECTORY_SEPARATOR.'removed-ids.php';
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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 = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->load('getFoo_BazService.php')) && false ?: '_'};
|
||||
|
||||
$this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
|
||||
|
||||
$a->configure($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo_bar' service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getFooBarService()
|
||||
{
|
||||
return new \Bar\FooClass(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->load('getDeprecatedServiceService.php')) && false ?: '_'});
|
||||
}
|
||||
|
||||
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))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
}
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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] => <?php
|
||||
|
||||
// This file has been auto-generated by the Symfony Dependency Injection Component for internal use.
|
||||
|
||||
if (\class_exists(\Container%s\ProjectServiceContainer::class, false)) {
|
||||
// no-op
|
||||
} elseif (!include __DIR__.'/Container%s/ProjectServiceContainer.php') {
|
||||
touch(__DIR__.'/Container%s.legacy');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!\class_exists(ProjectServiceContainer::class, false)) {
|
||||
\class_alias(\Container%s\ProjectServiceContainer::class, ProjectServiceContainer::class, false);
|
||||
}
|
||||
|
||||
return new \Container%s\ProjectServiceContainer(array(
|
||||
'container.build_hash' => '%s',
|
||||
'container.build_id' => '%s',
|
||||
'container.build_time' => %d,
|
||||
), __DIR__.\DIRECTORY_SEPARATOR.'Container%s');
|
||||
|
||||
)
|
476
vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_compiled.php
vendored
Normal file
476
vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_compiled.php
vendored
Normal file
|
@ -0,0 +1,476 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->syntheticIds = array(
|
||||
'request' => true,
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'baz' => 'getBazService',
|
||||
'configured_service' => 'getConfiguredServiceService',
|
||||
'configured_service_simple' => 'getConfiguredServiceSimpleService',
|
||||
'decorator_service' => 'getDecoratorServiceService',
|
||||
'decorator_service_with_name' => 'getDecoratorServiceWithNameService',
|
||||
'deprecated_service' => 'getDeprecatedServiceService',
|
||||
'factory_service' => 'getFactoryServiceService',
|
||||
'factory_service_simple' => 'getFactoryServiceSimpleService',
|
||||
'factory_simple' => 'getFactorySimpleService',
|
||||
'foo' => 'getFooService',
|
||||
'foo.baz' => 'getFoo_BazService',
|
||||
'foo_bar' => 'getFooBarService',
|
||||
'foo_with_inline' => 'getFooWithInlineService',
|
||||
'lazy_context' => 'getLazyContextService',
|
||||
'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService',
|
||||
'method_call1' => 'getMethodCall1Service',
|
||||
'new_factory_service' => 'getNewFactoryServiceService',
|
||||
'service_from_static_method' => 'getServiceFromStaticMethodService',
|
||||
'tagged_iterator' => 'getTaggedIteratorService',
|
||||
'tagged_iterator_foo' => 'getTaggedIteratorFooService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'factory_simple' => true,
|
||||
'tagged_iterator_foo' => true,
|
||||
);
|
||||
$this->aliases = array(
|
||||
'alias_for_alias' => 'foo',
|
||||
'alias_for_foo' => 'foo',
|
||||
'decorated' => 'decorator_service_with_name',
|
||||
);
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'configurator_service' => true,
|
||||
'configurator_service_simple' => true,
|
||||
'decorated.pif-pouf' => true,
|
||||
'decorator_service.inner' => true,
|
||||
'factory_simple' => true,
|
||||
'inlined' => true,
|
||||
'new_factory' => true,
|
||||
'tagged_iterator_foo' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
|
||||
|
||||
$this->services['bar'] = $instance = new \Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
|
||||
|
||||
$a->configure($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'baz' shared service.
|
||||
*
|
||||
* @return \Baz
|
||||
*/
|
||||
protected function getBazService()
|
||||
{
|
||||
$this->services['baz'] = $instance = new \Baz();
|
||||
|
||||
$instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->getFooWithInlineService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'configured_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getConfiguredServiceService()
|
||||
{
|
||||
$this->services['configured_service'] = $instance = new \stdClass();
|
||||
|
||||
$a = new \ConfClass();
|
||||
$a->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
|
||||
|
||||
$a->configureStdClass($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'configured_service_simple' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getConfiguredServiceSimpleService()
|
||||
{
|
||||
$this->services['configured_service_simple'] = $instance = new \stdClass();
|
||||
|
||||
(new \ConfClass('bar'))->configureStdClass($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'decorator_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getDecoratorServiceService()
|
||||
{
|
||||
return $this->services['decorator_service'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'decorator_service_with_name' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getDecoratorServiceWithNameService()
|
||||
{
|
||||
return $this->services['decorator_service_with_name'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'deprecated_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*
|
||||
* @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
|
||||
*/
|
||||
protected function getDeprecatedServiceService()
|
||||
{
|
||||
@trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['deprecated_service'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'factory_service' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getFactoryServiceService()
|
||||
{
|
||||
return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'}->getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'factory_service_simple' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getFactoryServiceSimpleService()
|
||||
{
|
||||
return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && false ?: '_'}->getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
|
||||
|
||||
$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(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'});
|
||||
$instance->initialize();
|
||||
sc_configure($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo.baz' shared service.
|
||||
*
|
||||
* @return \BazClass
|
||||
*/
|
||||
protected function getFoo_BazService()
|
||||
{
|
||||
$this->services['foo.baz'] = $instance = \BazClass::getInstance();
|
||||
|
||||
\BazClass::configureStatic1($instance);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo_bar' service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getFooBarService()
|
||||
{
|
||||
return new \Bar\FooClass(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->getDeprecatedServiceService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo_with_inline' shared service.
|
||||
*
|
||||
* @return \Foo
|
||||
*/
|
||||
protected function getFooWithInlineService()
|
||||
{
|
||||
$this->services['foo_with_inline'] = $instance = new \Foo();
|
||||
|
||||
$a = new \Bar();
|
||||
|
||||
$a->pub = 'pub';
|
||||
$a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
|
||||
|
||||
$instance->setBar($a);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'lazy_context' shared service.
|
||||
*
|
||||
* @return \LazyContext
|
||||
*/
|
||||
protected function getLazyContextService()
|
||||
{
|
||||
return $this->services['lazy_context'] = new \LazyContext(new RewindableGenerator(function () {
|
||||
yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
|
||||
yield 'k2' => $this;
|
||||
}, 2), new RewindableGenerator(function () {
|
||||
return new \EmptyIterator();
|
||||
}, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'lazy_context_ignore_invalid_ref' shared service.
|
||||
*
|
||||
* @return \LazyContext
|
||||
*/
|
||||
protected function getLazyContextIgnoreInvalidRefService()
|
||||
{
|
||||
return $this->services['lazy_context_ignore_invalid_ref'] = new \LazyContext(new RewindableGenerator(function () {
|
||||
yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
|
||||
}, 1), new RewindableGenerator(function () {
|
||||
return new \EmptyIterator();
|
||||
}, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'method_call1' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getMethodCall1Service()
|
||||
{
|
||||
include_once '%path%foo.php';
|
||||
|
||||
$this->services['method_call1'] = $instance = new \Bar\FooClass();
|
||||
|
||||
$instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
|
||||
$instance->setBar(NULL);
|
||||
$instance->setBar((${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}->foo() . (($this->hasParameter("foo")) ? ($this->getParameter("foo")) : ("default"))));
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'new_factory_service' shared service.
|
||||
*
|
||||
* @return \FooBarBaz
|
||||
*/
|
||||
protected function getNewFactoryServiceService()
|
||||
{
|
||||
$a = new \FactoryClass();
|
||||
$a->foo = 'bar';
|
||||
|
||||
$this->services['new_factory_service'] = $instance = $a->getInstance();
|
||||
|
||||
$instance->foo = 'bar';
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'service_from_static_method' shared service.
|
||||
*
|
||||
* @return \Bar\FooClass
|
||||
*/
|
||||
protected function getServiceFromStaticMethodService()
|
||||
{
|
||||
return $this->services['service_from_static_method'] = \Bar\FooClass::getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'tagged_iterator' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getTaggedIteratorService()
|
||||
{
|
||||
return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () {
|
||||
yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'};
|
||||
yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'};
|
||||
}, 2));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'factory_simple' shared service.
|
||||
*
|
||||
* @return \SimpleFactoryClass
|
||||
*
|
||||
* @deprecated The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.
|
||||
*/
|
||||
protected function getFactorySimpleService()
|
||||
{
|
||||
@trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->services['factory_simple'] = new \SimpleFactoryClass('foo');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'tagged_iterator_foo' shared service.
|
||||
*
|
||||
* @return \Bar
|
||||
*/
|
||||
protected function getTaggedIteratorFooService()
|
||||
{
|
||||
return $this->services['tagged_iterator_foo'] = new \Bar();
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$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));
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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',
|
||||
);
|
||||
}
|
||||
}
|
184
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php
vendored
Normal file
184
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php
vendored
Normal file
|
@ -0,0 +1,184 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->normalizedIds = array(
|
||||
'app\\bus' => 'App\\Bus',
|
||||
'app\\db' => 'App\\Db',
|
||||
'app\\handler1' => 'App\\Handler1',
|
||||
'app\\handler2' => 'App\\Handler2',
|
||||
'app\\processor' => 'App\\Processor',
|
||||
'app\\registry' => 'App\\Registry',
|
||||
'app\\schema' => 'App\\Schema',
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'App\\Bus' => 'getBusService',
|
||||
'App\\Db' => 'getDbService',
|
||||
'App\\Handler1' => 'getHandler1Service',
|
||||
'App\\Handler2' => 'getHandler2Service',
|
||||
'App\\Processor' => 'getProcessorService',
|
||||
'App\\Registry' => 'getRegistryService',
|
||||
'App\\Schema' => 'getSchemaService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'App\\Handler1' => true,
|
||||
'App\\Handler2' => true,
|
||||
'App\\Processor' => true,
|
||||
'App\\Registry' => true,
|
||||
'App\\Schema' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'App\\Handler1' => true,
|
||||
'App\\Handler2' => true,
|
||||
'App\\Processor' => true,
|
||||
'App\\Registry' => true,
|
||||
'App\\Schema' => true,
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'App\Bus' shared service.
|
||||
*
|
||||
* @return \App\Bus
|
||||
*/
|
||||
protected function getBusService()
|
||||
{
|
||||
$this->services['App\Bus'] = $instance = new \App\Bus(${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'});
|
||||
|
||||
$instance->handler1 = ${($_ = isset($this->services['App\Handler1']) ? $this->services['App\Handler1'] : $this->getHandler1Service()) && false ?: '_'};
|
||||
$instance->handler2 = ${($_ = isset($this->services['App\Handler2']) ? $this->services['App\Handler2'] : $this->getHandler2Service()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'App\Db' shared service.
|
||||
*
|
||||
* @return \App\Db
|
||||
*/
|
||||
protected function getDbService()
|
||||
{
|
||||
$this->services['App\Db'] = $instance = new \App\Db();
|
||||
|
||||
$instance->schema = ${($_ = isset($this->services['App\Schema']) ? $this->services['App\Schema'] : $this->getSchemaService()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'App\Handler1' shared service.
|
||||
*
|
||||
* @return \App\Handler1
|
||||
*/
|
||||
protected function getHandler1Service()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['App\Processor']) ? $this->services['App\Processor'] : $this->getProcessorService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['App\Handler1'])) {
|
||||
return $this->services['App\Handler1'];
|
||||
}
|
||||
|
||||
return $this->services['App\Handler1'] = new \App\Handler1(${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'}, ${($_ = isset($this->services['App\Schema']) ? $this->services['App\Schema'] : $this->getSchemaService()) && false ?: '_'}, $a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'App\Handler2' shared service.
|
||||
*
|
||||
* @return \App\Handler2
|
||||
*/
|
||||
protected function getHandler2Service()
|
||||
{
|
||||
return $this->services['App\Handler2'] = new \App\Handler2(${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'}, ${($_ = isset($this->services['App\Schema']) ? $this->services['App\Schema'] : $this->getSchemaService()) && false ?: '_'}, ${($_ = isset($this->services['App\Processor']) ? $this->services['App\Processor'] : $this->getProcessorService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'App\Processor' shared service.
|
||||
*
|
||||
* @return \App\Processor
|
||||
*/
|
||||
protected function getProcessorService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['App\Registry']) ? $this->services['App\Registry'] : $this->getRegistryService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['App\Processor'])) {
|
||||
return $this->services['App\Processor'];
|
||||
}
|
||||
|
||||
return $this->services['App\Processor'] = new \App\Processor($a, ${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'App\Registry' shared service.
|
||||
*
|
||||
* @return \App\Registry
|
||||
*/
|
||||
protected function getRegistryService()
|
||||
{
|
||||
$this->services['App\Registry'] = $instance = new \App\Registry();
|
||||
|
||||
$instance->processor = array(0 => ${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'}, 1 => ${($_ = isset($this->services['App\Bus']) ? $this->services['App\Bus'] : $this->getBusService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'App\Schema' shared service.
|
||||
*
|
||||
* @return \App\Schema
|
||||
*/
|
||||
protected function getSchemaService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['App\Schema'])) {
|
||||
return $this->services['App\Schema'];
|
||||
}
|
||||
|
||||
return $this->services['App\Schema'] = new \App\Schema($a);
|
||||
}
|
||||
}
|
340
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php
vendored
Normal file
340
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php
vendored
Normal file
|
@ -0,0 +1,340 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar2' => 'getBar2Service',
|
||||
'bar3' => 'getBar3Service',
|
||||
'bar6' => 'getBar6Service',
|
||||
'baz6' => 'getBaz6Service',
|
||||
'connection' => 'getConnectionService',
|
||||
'connection2' => 'getConnection2Service',
|
||||
'foo' => 'getFooService',
|
||||
'foo2' => 'getFoo2Service',
|
||||
'foo5' => 'getFoo5Service',
|
||||
'foo6' => 'getFoo6Service',
|
||||
'foobar4' => 'getFoobar4Service',
|
||||
'logger' => 'getLoggerService',
|
||||
'manager' => 'getManagerService',
|
||||
'manager2' => 'getManager2Service',
|
||||
'subscriber' => 'getSubscriberService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'bar6' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'bar' => true,
|
||||
'bar5' => true,
|
||||
'bar6' => true,
|
||||
'config' => true,
|
||||
'config2' => true,
|
||||
'dispatcher' => true,
|
||||
'dispatcher2' => true,
|
||||
'foo4' => true,
|
||||
'foobar' => true,
|
||||
'foobar2' => true,
|
||||
'foobar3' => true,
|
||||
'logger2' => true,
|
||||
'subscriber2' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar2' shared service.
|
||||
*
|
||||
* @return \BarCircular
|
||||
*/
|
||||
protected function getBar2Service()
|
||||
{
|
||||
$this->services['bar2'] = $instance = new \BarCircular();
|
||||
|
||||
$instance->addFoobar(new \FoobarCircular(${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->getFoo2Service()) && false ?: '_'}));
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar3' shared service.
|
||||
*
|
||||
* @return \BarCircular
|
||||
*/
|
||||
protected function getBar3Service()
|
||||
{
|
||||
$this->services['bar3'] = $instance = new \BarCircular();
|
||||
|
||||
$a = new \FoobarCircular();
|
||||
|
||||
$instance->addFoobar($a, $a);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'baz6' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBaz6Service()
|
||||
{
|
||||
$this->services['baz6'] = $instance = new \stdClass();
|
||||
|
||||
$instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'connection' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getConnectionService()
|
||||
{
|
||||
$a = new \stdClass();
|
||||
|
||||
$b = new \stdClass();
|
||||
|
||||
$this->services['connection'] = $instance = new \stdClass($a, $b);
|
||||
|
||||
$a->subscriber = ${($_ = isset($this->services['subscriber']) ? $this->services['subscriber'] : $this->getSubscriberService()) && false ?: '_'};
|
||||
|
||||
$b->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'connection2' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getConnection2Service()
|
||||
{
|
||||
$a = new \stdClass();
|
||||
|
||||
$c = new \stdClass();
|
||||
|
||||
$this->services['connection2'] = $instance = new \stdClass($a, $c);
|
||||
|
||||
$b = ${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'};
|
||||
|
||||
$a->subscriber2 = new \stdClass($b);
|
||||
|
||||
$d = new \stdClass($instance);
|
||||
|
||||
$d->handler2 = new \stdClass($b);
|
||||
|
||||
$c->logger2 = $d;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo' shared service.
|
||||
*
|
||||
* @return \FooCircular
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
$a = new \BarCircular();
|
||||
|
||||
$this->services['foo'] = $instance = new \FooCircular($a);
|
||||
|
||||
$a->addFoobar(new \FoobarCircular($instance));
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo2' shared service.
|
||||
*
|
||||
* @return \FooCircular
|
||||
*/
|
||||
protected function getFoo2Service()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['bar2']) ? $this->services['bar2'] : $this->getBar2Service()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['foo2'])) {
|
||||
return $this->services['foo2'];
|
||||
}
|
||||
|
||||
return $this->services['foo2'] = new \FooCircular($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo5' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoo5Service()
|
||||
{
|
||||
$this->services['foo5'] = $instance = new \stdClass();
|
||||
|
||||
$a = new \stdClass($instance);
|
||||
|
||||
$a->foo = $instance;
|
||||
|
||||
$instance->bar = $a;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo6' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoo6Service()
|
||||
{
|
||||
$this->services['foo6'] = $instance = new \stdClass();
|
||||
|
||||
$instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foobar4' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoobar4Service()
|
||||
{
|
||||
$a = new \stdClass();
|
||||
|
||||
$this->services['foobar4'] = $instance = new \stdClass($a);
|
||||
|
||||
$a->foobar = $instance;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'logger' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getLoggerService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['logger'])) {
|
||||
return $this->services['logger'];
|
||||
}
|
||||
|
||||
$this->services['logger'] = $instance = new \stdClass($a);
|
||||
|
||||
$instance->handler = new \stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'manager' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getManagerService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['manager'])) {
|
||||
return $this->services['manager'];
|
||||
}
|
||||
|
||||
return $this->services['manager'] = new \stdClass($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'manager2' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getManager2Service()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['connection2']) ? $this->services['connection2'] : $this->getConnection2Service()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['manager2'])) {
|
||||
return $this->services['manager2'];
|
||||
}
|
||||
|
||||
return $this->services['manager2'] = new \stdClass($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'subscriber' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getSubscriberService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['subscriber'])) {
|
||||
return $this->services['subscriber'];
|
||||
}
|
||||
|
||||
return $this->services['subscriber'] = new \stdClass($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'bar6' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBar6Service()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo6']) ? $this->services['foo6'] : $this->getFoo6Service()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['bar6'])) {
|
||||
return $this->services['bar6'];
|
||||
}
|
||||
|
||||
return $this->services['bar6'] = new \stdClass($a);
|
||||
}
|
||||
}
|
424
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php
vendored
Normal file
424
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php
vendored
Normal file
|
@ -0,0 +1,424 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'bar3' => 'getBar3Service',
|
||||
'bar5' => 'getBar5Service',
|
||||
'bar6' => 'getBar6Service',
|
||||
'baz6' => 'getBaz6Service',
|
||||
'connection' => 'getConnectionService',
|
||||
'connection2' => 'getConnection2Service',
|
||||
'dispatcher' => 'getDispatcherService',
|
||||
'dispatcher2' => 'getDispatcher2Service',
|
||||
'foo' => 'getFooService',
|
||||
'foo2' => 'getFoo2Service',
|
||||
'foo4' => 'getFoo4Service',
|
||||
'foo5' => 'getFoo5Service',
|
||||
'foo6' => 'getFoo6Service',
|
||||
'foobar' => 'getFoobarService',
|
||||
'foobar2' => 'getFoobar2Service',
|
||||
'foobar3' => 'getFoobar3Service',
|
||||
'foobar4' => 'getFoobar4Service',
|
||||
'logger' => 'getLoggerService',
|
||||
'manager' => 'getManagerService',
|
||||
'manager2' => 'getManager2Service',
|
||||
'subscriber' => 'getSubscriberService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'bar6' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'bar2' => true,
|
||||
'bar6' => true,
|
||||
'config' => true,
|
||||
'config2' => true,
|
||||
'logger2' => true,
|
||||
'subscriber2' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \BarCircular
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
$this->services['bar'] = $instance = new \BarCircular();
|
||||
|
||||
$instance->addFoobar(${($_ = isset($this->services['foobar']) ? $this->services['foobar'] : $this->getFoobarService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar3' shared service.
|
||||
*
|
||||
* @return \BarCircular
|
||||
*/
|
||||
protected function getBar3Service()
|
||||
{
|
||||
$this->services['bar3'] = $instance = new \BarCircular();
|
||||
|
||||
$a = ${($_ = isset($this->services['foobar3']) ? $this->services['foobar3'] : $this->services['foobar3'] = new \FoobarCircular()) && false ?: '_'};
|
||||
|
||||
$instance->addFoobar($a, $a);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar5' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBar5Service()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo5']) ? $this->services['foo5'] : $this->getFoo5Service()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['bar5'])) {
|
||||
return $this->services['bar5'];
|
||||
}
|
||||
|
||||
$this->services['bar5'] = $instance = new \stdClass($a);
|
||||
|
||||
$instance->foo = $a;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'baz6' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBaz6Service()
|
||||
{
|
||||
$this->services['baz6'] = $instance = new \stdClass();
|
||||
|
||||
$instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'connection' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getConnectionService()
|
||||
{
|
||||
$a = new \stdClass();
|
||||
|
||||
$this->services['connection'] = $instance = new \stdClass(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, $a);
|
||||
|
||||
$a->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'connection2' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getConnection2Service()
|
||||
{
|
||||
$a = new \stdClass();
|
||||
|
||||
$this->services['connection2'] = $instance = new \stdClass(${($_ = isset($this->services['dispatcher2']) ? $this->services['dispatcher2'] : $this->getDispatcher2Service()) && false ?: '_'}, $a);
|
||||
|
||||
$b = new \stdClass($instance);
|
||||
|
||||
$b->handler2 = new \stdClass(${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'});
|
||||
|
||||
$a->logger2 = $b;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'dispatcher' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getDispatcherService($lazyLoad = true)
|
||||
{
|
||||
$this->services['dispatcher'] = $instance = new \stdClass();
|
||||
|
||||
$instance->subscriber = ${($_ = isset($this->services['subscriber']) ? $this->services['subscriber'] : $this->getSubscriberService()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'dispatcher2' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getDispatcher2Service($lazyLoad = true)
|
||||
{
|
||||
$this->services['dispatcher2'] = $instance = new \stdClass();
|
||||
|
||||
$instance->subscriber2 = new \stdClass(${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo' shared service.
|
||||
*
|
||||
* @return \FooCircular
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['foo'])) {
|
||||
return $this->services['foo'];
|
||||
}
|
||||
|
||||
return $this->services['foo'] = new \FooCircular($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo2' shared service.
|
||||
*
|
||||
* @return \FooCircular
|
||||
*/
|
||||
protected function getFoo2Service()
|
||||
{
|
||||
$a = new \BarCircular();
|
||||
|
||||
$this->services['foo2'] = $instance = new \FooCircular($a);
|
||||
|
||||
$a->addFoobar(${($_ = isset($this->services['foobar2']) ? $this->services['foobar2'] : $this->getFoobar2Service()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo4' service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoo4Service()
|
||||
{
|
||||
$instance = new \stdClass();
|
||||
|
||||
$instance->foobar = ${($_ = isset($this->services['foobar4']) ? $this->services['foobar4'] : $this->getFoobar4Service()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo5' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoo5Service()
|
||||
{
|
||||
$this->services['foo5'] = $instance = new \stdClass();
|
||||
|
||||
$instance->bar = ${($_ = isset($this->services['bar5']) ? $this->services['bar5'] : $this->getBar5Service()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo6' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoo6Service()
|
||||
{
|
||||
$this->services['foo6'] = $instance = new \stdClass();
|
||||
|
||||
$instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foobar' shared service.
|
||||
*
|
||||
* @return \FoobarCircular
|
||||
*/
|
||||
protected function getFoobarService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['foobar'])) {
|
||||
return $this->services['foobar'];
|
||||
}
|
||||
|
||||
return $this->services['foobar'] = new \FoobarCircular($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foobar2' shared service.
|
||||
*
|
||||
* @return \FoobarCircular
|
||||
*/
|
||||
protected function getFoobar2Service()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->getFoo2Service()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['foobar2'])) {
|
||||
return $this->services['foobar2'];
|
||||
}
|
||||
|
||||
return $this->services['foobar2'] = new \FoobarCircular($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foobar3' shared service.
|
||||
*
|
||||
* @return \FoobarCircular
|
||||
*/
|
||||
protected function getFoobar3Service()
|
||||
{
|
||||
return $this->services['foobar3'] = new \FoobarCircular();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foobar4' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoobar4Service()
|
||||
{
|
||||
$a = new \stdClass();
|
||||
|
||||
$this->services['foobar4'] = $instance = new \stdClass($a);
|
||||
|
||||
$a->foobar = $instance;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'logger' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getLoggerService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['logger'])) {
|
||||
return $this->services['logger'];
|
||||
}
|
||||
|
||||
$this->services['logger'] = $instance = new \stdClass($a);
|
||||
|
||||
$instance->handler = new \stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'manager' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getManagerService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['manager'])) {
|
||||
return $this->services['manager'];
|
||||
}
|
||||
|
||||
return $this->services['manager'] = new \stdClass($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'manager2' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getManager2Service()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['connection2']) ? $this->services['connection2'] : $this->getConnection2Service()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['manager2'])) {
|
||||
return $this->services['manager2'];
|
||||
}
|
||||
|
||||
return $this->services['manager2'] = new \stdClass($a);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'subscriber' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getSubscriberService()
|
||||
{
|
||||
return $this->services['subscriber'] = new \stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'bar6' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBar6Service()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['foo6']) ? $this->services['foo6'] : $this->getFoo6Service()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['bar6'])) {
|
||||
return $this->services['bar6'];
|
||||
}
|
||||
|
||||
return $this->services['bar6'] = new \stdClass($a);
|
||||
}
|
||||
}
|
176
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php
vendored
Normal file
176
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php
vendored
Normal file
|
@ -0,0 +1,176 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$dir = __DIR__;
|
||||
for ($i = 1; $i <= 5; ++$i) {
|
||||
$this->targetDirs[$i] = $dir = \dirname($dir);
|
||||
}
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \BarClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
$this->services['bar'] = $instance = new \BarClass();
|
||||
|
||||
$instance->setBaz($this->parameters['array_1'], $this->getParameter('array_2'), '%array_1%', $this->parameters['array_1']);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$this->parameterBag = new FrozenParameterBag($parameters);
|
||||
}
|
||||
|
||||
return $this->parameterBag;
|
||||
}
|
||||
|
||||
private $loadedDynamicParameters = array(
|
||||
'array_2' => false,
|
||||
);
|
||||
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)
|
||||
{
|
||||
switch ($name) {
|
||||
case 'array_2': $value = array(
|
||||
0 => ($this->targetDirs[2].'/Dumper'),
|
||||
); break;
|
||||
default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
|
||||
}
|
||||
$this->loadedDynamicParameters[$name] = true;
|
||||
|
||||
return $this->dynamicParameters[$name] = $value;
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'array_1' => array(
|
||||
0 => 123,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
151
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php
vendored
Normal file
151
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php
vendored
Normal file
|
@ -0,0 +1,151 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$this->parameterBag = new FrozenParameterBag($parameters);
|
||||
}
|
||||
|
||||
return $this->parameterBag;
|
||||
}
|
||||
|
||||
private $loadedDynamicParameters = array(
|
||||
'hello' => false,
|
||||
);
|
||||
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)
|
||||
{
|
||||
switch ($name) {
|
||||
case 'hello': $value = $this->getEnv('base64:foo'); break;
|
||||
default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
|
||||
}
|
||||
$this->loadedDynamicParameters[$name] = true;
|
||||
|
||||
return $this->dynamicParameters[$name] = $value;
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'env(foo)' => 'd29ybGQ=',
|
||||
);
|
||||
}
|
||||
}
|
88
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_dedup_lazy_proxy.php
vendored
Normal file
88
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_dedup_lazy_proxy.php
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'foo' => 'getFooService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function createProxy($class, \Closure $factory)
|
||||
{
|
||||
return $factory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarService($lazyLoad = true)
|
||||
{
|
||||
// lazy factory for stdClass
|
||||
|
||||
return new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFooService($lazyLoad = true)
|
||||
{
|
||||
// lazy factory for stdClass
|
||||
|
||||
return new \stdClass();
|
||||
}
|
||||
}
|
||||
|
||||
// proxy code for stdClass
|
93
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php
vendored
Normal file
93
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php
vendored
Normal file
|
@ -0,0 +1,93 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_Deep_Graph extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'foo' => 'getFooService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
$this->services['bar'] = $instance = new \stdClass();
|
||||
|
||||
$instance->p5 = new \stdClass(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Dumper\FooForDeepGraph
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
$a = ${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'};
|
||||
|
||||
if (isset($this->services['foo'])) {
|
||||
return $this->services['foo'];
|
||||
}
|
||||
|
||||
$b = new \stdClass();
|
||||
$c = new \stdClass();
|
||||
$c->p3 = new \stdClass();
|
||||
|
||||
$b->p2 = $c;
|
||||
|
||||
return $this->services['foo'] = new \Symfony\Component\DependencyInjection\Tests\Dumper\FooForDeepGraph($a, $b);
|
||||
}
|
||||
}
|
188
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php
vendored
Normal file
188
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php
vendored
Normal file
|
@ -0,0 +1,188 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->normalizedIds = array(
|
||||
'bar_%env(bar)%' => 'bar_%env(BAR)%',
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'bar_%env(BAR)%' => 'getBarenvBARService',
|
||||
'foo' => 'getFooService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'bar_%env(BAR)%' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'bar_%env(BAR)%' => true,
|
||||
'baz_%env(BAR)%' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : $this->services['bar_%env(BAR)%'] = new \stdClass()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
return $this->services['foo'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : $this->services['bar_%env(BAR)%'] = new \stdClass()) && false ?: '_'}, array('baz_'.$this->getEnv('string:BAR') => new \stdClass()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'bar_%env(BAR)%' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarenvBARService()
|
||||
{
|
||||
return $this->services['bar_%env(BAR)%'] = new \stdClass();
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$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));
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array(
|
||||
'env(bar)' => 'env(BAR)',
|
||||
);
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'env(BAR)' => 'bar',
|
||||
);
|
||||
}
|
||||
}
|
215
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php
vendored
Normal file
215
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php
vendored
Normal file
|
@ -0,0 +1,215 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$dir = __DIR__;
|
||||
for ($i = 1; $i <= 5; ++$i) {
|
||||
$this->targetDirs[$i] = $dir = \dirname($dir);
|
||||
}
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->normalizedIds = array(
|
||||
'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c1' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1',
|
||||
'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c2' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2',
|
||||
'symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c3' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3',
|
||||
'symfony\\component\\dependencyinjection\\tests\\fixtures\\parentnotexists' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists',
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists' => 'getParentNotExistsService',
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1' => 'getC1Service',
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2' => 'getC2Service',
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => 'getC3Service',
|
||||
);
|
||||
$this->privates = array(
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
|
||||
$this->privates['service_container'] = function () {
|
||||
include_once $this->targetDirs[1].'/includes/HotPath/I1.php';
|
||||
include_once $this->targetDirs[1].'/includes/HotPath/P1.php';
|
||||
include_once $this->targetDirs[1].'/includes/HotPath/T1.php';
|
||||
include_once $this->targetDirs[1].'/includes/HotPath/C1.php';
|
||||
};
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists
|
||||
*/
|
||||
protected function getParentNotExistsService()
|
||||
{
|
||||
return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1
|
||||
*/
|
||||
protected function getC1Service()
|
||||
{
|
||||
return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2
|
||||
*/
|
||||
protected function getC2Service()
|
||||
{
|
||||
include_once $this->targetDirs[1].'/includes/HotPath/C2.php';
|
||||
include_once $this->targetDirs[1].'/includes/HotPath/C3.php';
|
||||
|
||||
return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3
|
||||
*/
|
||||
protected function getC3Service()
|
||||
{
|
||||
include_once $this->targetDirs[1].'/includes/HotPath/C3.php';
|
||||
|
||||
return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3();
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$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));
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'inline_requires' => true,
|
||||
);
|
||||
}
|
||||
}
|
78
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php
vendored
Normal file
78
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_Inline_Self_Ref extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->normalizedIds = array(
|
||||
'app\\foo' => 'App\\Foo',
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'App\\Foo' => 'getFooService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'App\Foo' shared service.
|
||||
*
|
||||
* @return \App\Foo
|
||||
*/
|
||||
protected function getFooService()
|
||||
{
|
||||
$b = new \App\Bar();
|
||||
$a = new \App\Baz($b);
|
||||
|
||||
$this->services['App\Foo'] = $instance = new \App\Foo($a);
|
||||
|
||||
$b->foo = $instance;
|
||||
|
||||
$a->bar = $b;
|
||||
|
||||
return $instance;
|
||||
}
|
||||
}
|
193
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php
vendored
Normal file
193
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php
vendored
Normal file
|
@ -0,0 +1,193 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$dir = __DIR__;
|
||||
for ($i = 1; $i <= 5; ++$i) {
|
||||
$this->targetDirs[$i] = $dir = \dirname($dir);
|
||||
}
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'private' => 'getPrivateService',
|
||||
'private_alias' => 'getPrivateAliasService',
|
||||
'private_alias_decorator' => 'getPrivateAliasDecoratorService',
|
||||
'private_child' => 'getPrivateChildService',
|
||||
'private_decorator' => 'getPrivateDecoratorService',
|
||||
'private_not_inlined' => 'getPrivateNotInlinedService',
|
||||
'private_not_removed' => 'getPrivateNotRemovedService',
|
||||
'private_parent' => 'getPrivateParentService',
|
||||
'public_child' => 'getPublicChildService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'decorated_private' => true,
|
||||
'decorated_private_alias' => true,
|
||||
'private' => true,
|
||||
'private_alias' => true,
|
||||
'private_child' => true,
|
||||
'private_not_inlined' => true,
|
||||
'private_not_removed' => true,
|
||||
'private_parent' => true,
|
||||
);
|
||||
$this->aliases = array(
|
||||
'alias_to_private' => 'private',
|
||||
'decorated_private' => 'private_decorator',
|
||||
'decorated_private_alias' => 'private_alias_decorator',
|
||||
);
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'decorated_private' => true,
|
||||
'decorated_private_alias' => true,
|
||||
'foo' => true,
|
||||
'private' => true,
|
||||
'private_alias' => true,
|
||||
'private_alias_decorator.inner' => true,
|
||||
'private_child' => true,
|
||||
'private_decorator.inner' => true,
|
||||
'private_not_inlined' => true,
|
||||
'private_not_removed' => true,
|
||||
'private_parent' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['private_not_inlined']) ? $this->services['private_not_inlined'] : $this->services['private_not_inlined'] = new \stdClass()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'private_alias_decorator' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateAliasDecoratorService()
|
||||
{
|
||||
return $this->services['private_alias_decorator'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'private_decorator' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateDecoratorService()
|
||||
{
|
||||
return $this->services['private_decorator'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'public_child' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPublicChildService()
|
||||
{
|
||||
return $this->services['public_child'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'private' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateService()
|
||||
{
|
||||
return $this->services['private'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'private_alias' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateAliasService()
|
||||
{
|
||||
return $this->services['private_alias'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'private_child' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateChildService()
|
||||
{
|
||||
return $this->services['private_child'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'private_not_inlined' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateNotInlinedService()
|
||||
{
|
||||
return $this->services['private_not_inlined'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'private_not_removed' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateNotRemovedService()
|
||||
{
|
||||
return $this->services['private_not_removed'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'private_parent' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateParentService()
|
||||
{
|
||||
return $this->services['private_parent'] = new \stdClass();
|
||||
}
|
||||
}
|
184
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php
vendored
Normal file
184
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php
vendored
Normal file
|
@ -0,0 +1,184 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar_service' => 'getBarServiceService',
|
||||
'baz_service' => 'getBazServiceService',
|
||||
'foo_service' => 'getFooServiceService',
|
||||
'translator.loader_1' => 'getTranslator_Loader1Service',
|
||||
'translator.loader_2' => 'getTranslator_Loader2Service',
|
||||
'translator.loader_3' => 'getTranslator_Loader3Service',
|
||||
'translator_1' => 'getTranslator1Service',
|
||||
'translator_2' => 'getTranslator2Service',
|
||||
'translator_3' => 'getTranslator3Service',
|
||||
);
|
||||
$this->privates = array(
|
||||
'baz_service' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'baz_service' => true,
|
||||
'translator.loader_1_locator' => true,
|
||||
'translator.loader_2_locator' => true,
|
||||
'translator.loader_3_locator' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarServiceService()
|
||||
{
|
||||
return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo_service' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\ServiceLocator
|
||||
*/
|
||||
protected function getFooServiceService()
|
||||
{
|
||||
return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\ServiceLocator(array('bar' => function () {
|
||||
return ${($_ = isset($this->services['bar_service']) ? $this->services['bar_service'] : $this->getBarServiceService()) && false ?: '_'};
|
||||
}, 'baz' => function () {
|
||||
$f = function (\stdClass $v) { return $v; }; return $f(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'});
|
||||
}, 'nil' => function () {
|
||||
return NULL;
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'translator.loader_1' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getTranslator_Loader1Service()
|
||||
{
|
||||
return $this->services['translator.loader_1'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'translator.loader_2' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getTranslator_Loader2Service()
|
||||
{
|
||||
return $this->services['translator.loader_2'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'translator.loader_3' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getTranslator_Loader3Service()
|
||||
{
|
||||
return $this->services['translator.loader_3'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'translator_1' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator
|
||||
*/
|
||||
protected function getTranslator1Service()
|
||||
{
|
||||
return $this->services['translator_1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_1' => function () {
|
||||
return ${($_ = isset($this->services['translator.loader_1']) ? $this->services['translator.loader_1'] : $this->services['translator.loader_1'] = new \stdClass()) && false ?: '_'};
|
||||
})));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'translator_2' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator
|
||||
*/
|
||||
protected function getTranslator2Service()
|
||||
{
|
||||
$this->services['translator_2'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_2' => function () {
|
||||
return ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : $this->services['translator.loader_2'] = new \stdClass()) && false ?: '_'};
|
||||
})));
|
||||
|
||||
$instance->addResource('db', ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : $this->services['translator.loader_2'] = new \stdClass()) && false ?: '_'}, 'nl');
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'translator_3' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator
|
||||
*/
|
||||
protected function getTranslator3Service()
|
||||
{
|
||||
$this->services['translator_3'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_3' => function () {
|
||||
return ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : $this->services['translator.loader_3'] = new \stdClass()) && false ?: '_'};
|
||||
})));
|
||||
|
||||
$a = ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : $this->services['translator.loader_3'] = new \stdClass()) && false ?: '_'};
|
||||
|
||||
$instance->addResource('db', $a, 'nl');
|
||||
$instance->addResource('db', $a, 'en');
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'baz_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBazServiceService()
|
||||
{
|
||||
return $this->services['baz_service'] = new \stdClass();
|
||||
}
|
||||
}
|
92
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_non_shared_lazy.php
vendored
Normal file
92
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_non_shared_lazy.php
vendored
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'foo' => 'getFooService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'bar' => true,
|
||||
'foo' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'bar' => true,
|
||||
'foo' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function createProxy($class, \Closure $factory)
|
||||
{
|
||||
return $factory();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'bar' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'foo' service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFooService($lazyLoad = true)
|
||||
{
|
||||
// lazy factory for stdClass
|
||||
|
||||
return new \stdClass();
|
||||
}
|
||||
}
|
||||
|
||||
// proxy code for stdClass
|
92
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php
vendored
Normal file
92
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php
vendored
Normal file
|
@ -0,0 +1,92 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar_service' => 'getBarServiceService',
|
||||
'baz_service' => 'getBazServiceService',
|
||||
'foo_service' => 'getFooServiceService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'baz_service' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'baz_service' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarServiceService()
|
||||
{
|
||||
return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFooServiceService()
|
||||
{
|
||||
return $this->services['foo_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'baz_service' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBazServiceService()
|
||||
{
|
||||
return $this->services['baz_service'] = new \stdClass();
|
||||
}
|
||||
}
|
82
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php
vendored
Normal file
82
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php
vendored
Normal file
|
@ -0,0 +1,82 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'private_foo' => 'getPrivateFooService',
|
||||
'public_foo' => 'getPublicFooService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'private_foo' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'private_bar' => true,
|
||||
'private_foo' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'public_foo' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPublicFooService()
|
||||
{
|
||||
return $this->services['public_foo'] = new \stdClass(${($_ = isset($this->services['private_foo']) ? $this->services['private_foo'] : $this->services['private_foo'] = new \stdClass()) && false ?: '_'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'private_foo' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getPrivateFooService()
|
||||
{
|
||||
return $this->services['private_foo'] = new \stdClass();
|
||||
}
|
||||
}
|
180
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php
vendored
Normal file
180
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php
vendored
Normal file
|
@ -0,0 +1,180 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->parameters = $this->getDefaultParameters();
|
||||
|
||||
$this->services = array();
|
||||
$this->normalizedIds = array(
|
||||
'symfony\\component\\dependencyinjection\\tests\\dumper\\rot13envvarprocessor' => 'Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor',
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor' => 'getRot13EnvVarProcessorService',
|
||||
'container.env_var_processors_locator' => 'getContainer_EnvVarProcessorsLocatorService',
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor
|
||||
*/
|
||||
protected function getRot13EnvVarProcessorService()
|
||||
{
|
||||
return $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] = new \Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'container.env_var_processors_locator' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\ServiceLocator
|
||||
*/
|
||||
protected function getContainer_EnvVarProcessorsLocatorService()
|
||||
{
|
||||
return $this->services['container.env_var_processors_locator'] = new \Symfony\Component\DependencyInjection\ServiceLocator(array('rot13' => function () {
|
||||
return ${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] : $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] = new \Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor()) && false ?: '_'};
|
||||
}));
|
||||
}
|
||||
|
||||
public function getParameter($name)
|
||||
{
|
||||
$name = (string) $name;
|
||||
if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
|
||||
$name = $this->normalizeParameterName($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;
|
||||
$name = $this->normalizeParameterName($name);
|
||||
|
||||
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);
|
||||
}
|
||||
$this->parameterBag = new FrozenParameterBag($parameters);
|
||||
}
|
||||
|
||||
return $this->parameterBag;
|
||||
}
|
||||
|
||||
private $loadedDynamicParameters = array(
|
||||
'hello' => false,
|
||||
);
|
||||
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)
|
||||
{
|
||||
switch ($name) {
|
||||
case 'hello': $value = $this->getEnv('rot13:foo'); break;
|
||||
default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
|
||||
}
|
||||
$this->loadedDynamicParameters[$name] = true;
|
||||
|
||||
return $this->dynamicParameters[$name] = $value;
|
||||
}
|
||||
|
||||
private $normalizedParameterNames = array();
|
||||
|
||||
private function normalizeParameterName($name)
|
||||
{
|
||||
if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
|
||||
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
|
||||
if ((string) $name !== $normalizedName) {
|
||||
@trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
|
||||
}
|
||||
} else {
|
||||
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
|
||||
}
|
||||
|
||||
return $normalizedName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the default parameters.
|
||||
*
|
||||
* @return array An array of the default parameters
|
||||
*/
|
||||
protected function getDefaultParameters()
|
||||
{
|
||||
return array(
|
||||
'env(foo)' => 'jbeyq',
|
||||
);
|
||||
}
|
||||
}
|
106
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php
vendored
Normal file
106
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php
vendored
Normal file
|
@ -0,0 +1,106 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->normalizedIds = array(
|
||||
'symfony\\component\\dependencyinjection\\tests\\fixtures\\customdefinition' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition',
|
||||
'symfony\\component\\dependencyinjection\\tests\\fixtures\\testservicesubscriber' => 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber',
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => 'getCustomDefinitionService',
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => 'getTestServiceSubscriberService',
|
||||
'foo_service' => 'getFooServiceService',
|
||||
);
|
||||
$this->privates = array(
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true,
|
||||
'service_locator.jmktfsv' => true,
|
||||
'service_locator.jmktfsv.foo_service' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber
|
||||
*/
|
||||
protected function getTestServiceSubscriberService()
|
||||
{
|
||||
return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo_service' shared autowired service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber
|
||||
*/
|
||||
protected function getFooServiceService()
|
||||
{
|
||||
return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber((new \Symfony\Component\DependencyInjection\ServiceLocator(array('Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => function () {
|
||||
$f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition()) && false ?: '_'});
|
||||
}, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => function () {
|
||||
$f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber()) && false ?: '_'});
|
||||
}, 'bar' => function () {
|
||||
$f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber()) && false ?: '_'});
|
||||
}, 'baz' => function () {
|
||||
$f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition()) && false ?: '_'});
|
||||
})))->withContext('foo_service', $this));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition' shared service.
|
||||
*
|
||||
* @return \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition
|
||||
*/
|
||||
protected function getCustomDefinitionService()
|
||||
{
|
||||
return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition();
|
||||
}
|
||||
}
|
89
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php
vendored
Normal file
89
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class ProjectServiceContainer extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->normalizedIds = array(
|
||||
'tsantos\\serializer\\serializerinterface' => 'TSantos\\Serializer\\SerializerInterface',
|
||||
);
|
||||
$this->methodMap = array(
|
||||
'tsantos_serializer' => 'getTsantosSerializerService',
|
||||
);
|
||||
$this->aliases = array(
|
||||
'TSantos\\Serializer\\SerializerInterface' => 'tsantos_serializer',
|
||||
);
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'tsantos_serializer' shared service.
|
||||
*
|
||||
* @return \TSantos\Serializer\EventEmitterSerializer
|
||||
*/
|
||||
protected function getTsantosSerializerService()
|
||||
{
|
||||
$a = new \TSantos\Serializer\NormalizerRegistry();
|
||||
|
||||
$d = new \TSantos\Serializer\EventDispatcher\EventDispatcher();
|
||||
$d->addSubscriber(new \TSantos\SerializerBundle\EventListener\StopwatchListener(new \Symfony\Component\Stopwatch\Stopwatch(true)));
|
||||
|
||||
$this->services['tsantos_serializer'] = $instance = new \TSantos\Serializer\EventEmitterSerializer(new \TSantos\Serializer\Encoder\JsonEncoder(), $a, $d);
|
||||
|
||||
$b = new \TSantos\Serializer\Normalizer\CollectionNormalizer();
|
||||
|
||||
$b->setSerializer($instance);
|
||||
|
||||
$c = new \TSantos\Serializer\Normalizer\JsonNormalizer();
|
||||
|
||||
$c->setSerializer($instance);
|
||||
|
||||
$a->add(new \TSantos\Serializer\Normalizer\ObjectNormalizer(new \TSantos\SerializerBundle\Serializer\CircularReferenceHandler()));
|
||||
$a->add($b);
|
||||
$a->add($c);
|
||||
|
||||
return $instance;
|
||||
}
|
||||
}
|
134
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php
vendored
Normal file
134
vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php
vendored
Normal file
|
@ -0,0 +1,134 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Symfony\Component\DependencyInjection\Container;
|
||||
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\DependencyInjection\Exception\LogicException;
|
||||
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
|
||||
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
|
||||
|
||||
/**
|
||||
* This class has been auto-generated
|
||||
* by the Symfony Dependency Injection Component.
|
||||
*
|
||||
* @final since Symfony 3.3
|
||||
*/
|
||||
class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container
|
||||
{
|
||||
private $parameters;
|
||||
private $targetDirs = array();
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->services = array();
|
||||
$this->methodMap = array(
|
||||
'bar' => 'getBarService',
|
||||
'baz' => 'getBazService',
|
||||
'foo1' => 'getFoo1Service',
|
||||
'foo3' => 'getFoo3Service',
|
||||
);
|
||||
$this->privates = array(
|
||||
'foo3' => true,
|
||||
);
|
||||
|
||||
$this->aliases = array();
|
||||
}
|
||||
|
||||
public function getRemovedIds()
|
||||
{
|
||||
return array(
|
||||
'Psr\\Container\\ContainerInterface' => true,
|
||||
'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true,
|
||||
'foo2' => true,
|
||||
'foo3' => true,
|
||||
);
|
||||
}
|
||||
|
||||
public function compile()
|
||||
{
|
||||
throw new LogicException('You cannot compile a dumped container that was already compiled.');
|
||||
}
|
||||
|
||||
public function isCompiled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isFrozen()
|
||||
{
|
||||
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'bar' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBarService()
|
||||
{
|
||||
$this->services['bar'] = $instance = new \stdClass();
|
||||
|
||||
$instance->foo1 = ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'};
|
||||
$instance->foo2 = null;
|
||||
$instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'};
|
||||
$instance->closures = array(0 => function () {
|
||||
return ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'};
|
||||
}, 1 => function () {
|
||||
return null;
|
||||
}, 2 => function () {
|
||||
return ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'};
|
||||
});
|
||||
$instance->iter = new RewindableGenerator(function () {
|
||||
if (isset($this->services['foo1'])) {
|
||||
yield 'foo1' => ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'};
|
||||
}
|
||||
if (false) {
|
||||
yield 'foo2' => null;
|
||||
}
|
||||
if (isset($this->services['foo3'])) {
|
||||
yield 'foo3' => ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'};
|
||||
}
|
||||
}, function () {
|
||||
return 0 + (int) (isset($this->services['foo1'])) + (int) (false) + (int) (isset($this->services['foo3']));
|
||||
});
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'baz' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getBazService()
|
||||
{
|
||||
$this->services['baz'] = $instance = new \stdClass();
|
||||
|
||||
$instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : $this->services['foo3'] = new \stdClass()) && false ?: '_'};
|
||||
|
||||
return $instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the public 'foo1' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoo1Service()
|
||||
{
|
||||
return $this->services['foo1'] = new \stdClass();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the private 'foo3' shared service.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
protected function getFoo3Service()
|
||||
{
|
||||
return $this->services['foo3'] = new \stdClass();
|
||||
}
|
||||
}
|
3
vendor/symfony/dependency-injection/Tests/Fixtures/php/simple.php
vendored
Normal file
3
vendor/symfony/dependency-injection/Tests/Fixtures/php/simple.php
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
$container->setParameter('foo', 'foo');
|
Reference in a new issue