2013-01-05 08:50:11 +00:00
< ? php
2016-12-13 17:37:51 +00:00
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator ;
2013-01-05 08:50:11 +00:00
use Symfony\Component\DependencyInjection\ContainerInterface ;
use Symfony\Component\DependencyInjection\Container ;
2013-01-05 15:29:42 +00:00
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException ;
use Symfony\Component\DependencyInjection\Exception\LogicException ;
use Symfony\Component\DependencyInjection\Exception\RuntimeException ;
2013-01-05 08:50:11 +00:00
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag ;
/**
* This class has been auto - generated
* by the Symfony Dependency Injection Component .
2017-01-12 22:13:34 +00:00
*
* @ final since Symfony 3.3
2013-01-05 08:50:11 +00:00
*/
class ProjectServiceContainer extends Container
{
2014-12-03 08:59:38 +00:00
private $parameters ;
2014-12-04 20:13:58 +00:00
private $targetDirs = array ();
2013-12-01 06:04:55 +00:00
2013-01-05 08:50:11 +00:00
public function __construct ()
{
$this -> parameters = $this -> getDefaultParameters ();
2015-09-04 20:54:37 +01:00
$this -> services = array ();
2017-10-07 22:38:34 +01:00
$this -> syntheticIds = array (
'request' => true ,
);
2013-05-05 11:11:01 +01:00
$this -> methodMap = array (
'bar' => 'getBarService' ,
'baz' => 'getBazService' ,
2013-11-02 12:45:44 +00:00
'configured_service' => 'getConfiguredServiceService' ,
2016-04-30 11:40:11 +01:00
'configured_service_simple' => 'getConfiguredServiceSimpleService' ,
2014-03-31 16:58:40 +01:00
'decorator_service' => 'getDecoratorServiceService' ,
'decorator_service_with_name' => 'getDecoratorServiceWithNameService' ,
2015-08-07 17:08:40 +01:00
'deprecated_service' => 'getDeprecatedServiceService' ,
2013-05-05 11:11:01 +01:00
'factory_service' => 'getFactoryServiceService' ,
2016-04-30 11:40:11 +01:00
'factory_service_simple' => 'getFactoryServiceSimpleService' ,
2017-07-26 08:41:52 +01:00
'factory_simple' => 'getFactorySimpleService' ,
2013-05-05 11:11:01 +01:00
'foo' => 'getFooService' ,
'foo.baz' => 'getFoo_BazService' ,
'foo_bar' => 'getFooBarService' ,
'foo_with_inline' => 'getFooWithInlineService' ,
2016-12-13 17:37:51 +00:00
'lazy_context' => 'getLazyContextService' ,
'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService' ,
2013-05-05 11:11:01 +01:00
'method_call1' => 'getMethodCall1Service' ,
2014-04-13 16:18:39 +01:00
'new_factory_service' => 'getNewFactoryServiceService' ,
2014-09-27 17:06:30 +01:00
'service_from_static_method' => 'getServiceFromStaticMethodService' ,
2017-03-28 11:05:21 +01:00
'tagged_iterator' => 'getTaggedIteratorService' ,
'tagged_iterator_foo' => 'getTaggedIteratorFooService' ,
2013-06-04 13:28:00 +01:00
);
2017-07-26 08:41:52 +01:00
$this -> privates = array (
'factory_simple' => true ,
2017-03-28 11:05:21 +01:00
'tagged_iterator_foo' => true ,
2017-07-26 08:41:52 +01:00
);
2013-06-04 13:28:00 +01:00
$this -> aliases = array (
2013-06-05 10:51:05 +01:00
'alias_for_alias' => 'foo' ,
2013-06-04 13:28:00 +01:00
'alias_for_foo' => 'foo' ,
2014-03-31 16:58:40 +01:00
'decorated' => 'decorator_service_with_name' ,
2013-05-05 11:11:01 +01:00
);
2013-01-05 08:50:11 +00:00
}
2017-10-07 22:38:34 +01:00
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 ,
'inlined' => true ,
'new_factory' => true ,
);
}
2014-09-05 10:37:47 +01:00
public function compile ()
{
2016-08-19 13:18:08 +01:00
throw new LogicException ( 'You cannot compile a dumped container that was already compiled.' );
}
public function isCompiled ()
{
return true ;
2014-09-05 10:37:47 +01:00
}
2016-08-22 09:46:49 +01:00
public function isFrozen ()
{
2016-08-19 13:18:08 +01:00
@ trigger_error ( sprintf ( 'The %s() method is deprecated since version 3.3 and will be removed in 4.0. Use the isCompiled() method instead.' , __METHOD__ ), E_USER_DEPRECATED );
2016-08-22 09:46:49 +01:00
return true ;
}
2013-01-05 08:50:11 +00:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'bar' shared service .
2013-01-05 08:50:11 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \Bar\FooClass
2013-01-05 08:50:11 +00:00
*/
protected function getBarService ()
{
2017-07-26 08:41:52 +01:00
$a = $ {( $_ = isset ( $this -> services [ 'foo.baz' ]) ? $this -> services [ 'foo.baz' ] : $this -> getFoo_BazService ()) && false ? : '_' };
2013-01-05 08:50:11 +00:00
2017-11-04 20:24:26 +00:00
if ( isset ( $this -> services [ 'bar' ])) {
return $this -> services [ 'bar' ];
}
2013-12-18 17:52:54 +00:00
$this -> services [ 'bar' ] = $instance = new \Bar\FooClass ( 'foo' , $a , $this -> getParameter ( 'foo_bar' ));
2013-11-02 12:45:44 +00:00
$a -> configure ( $instance );
2013-01-05 08:50:11 +00:00
return $instance ;
}
2013-01-05 09:16:41 +00:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'baz' shared service .
2013-01-05 09:16:41 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \Baz
2013-01-05 09:16:41 +00:00
*/
protected function getBazService ()
{
2017-02-16 22:39:07 +00:00
$this -> services [ 'baz' ] = $instance = new \Baz ();
2017-07-26 08:41:52 +01:00
$instance -> setFoo ( $ {( $_ = isset ( $this -> services [ 'foo_with_inline' ]) ? $this -> services [ 'foo_with_inline' ] : $this -> getFooWithInlineService ()) && false ? : '_' });
2017-02-16 22:39:07 +00:00
return $instance ;
2013-01-05 09:16:41 +00:00
}
2013-11-02 12:45:44 +00:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'configured_service' shared service .
2013-11-02 12:45:44 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \stdClass
2013-11-02 12:45:44 +00:00
*/
protected function getConfiguredServiceService ()
{
2017-11-04 20:24:26 +00:00
$a = $ {( $_ = isset ( $this -> services [ 'baz' ]) ? $this -> services [ 'baz' ] : $this -> getBazService ()) && false ? : '_' };
if ( isset ( $this -> services [ 'configured_service' ])) {
return $this -> services [ 'configured_service' ];
}
$b = new \ConfClass ();
$b -> setFoo ( $a );
2015-03-23 18:17:24 +00:00
2013-11-02 12:45:44 +00:00
$this -> services [ 'configured_service' ] = $instance = new \stdClass ();
2017-11-04 20:24:26 +00:00
$b -> configureStdClass ( $instance );
2013-11-02 12:45:44 +00:00
return $instance ;
}
2016-04-30 11:40:11 +01:00
/**
2017-07-26 08:58:16 +01:00
* Gets the public 'configured_service_simple' shared service .
2016-04-30 11:40:11 +01:00
*
2017-07-26 08:58:16 +01:00
* @ return \stdClass
2016-04-30 11:40:11 +01:00
*/
protected function getConfiguredServiceSimpleService ()
{
$this -> services [ 'configured_service_simple' ] = $instance = new \stdClass ();
( new \ConfClass ( 'bar' )) -> configureStdClass ( $instance );
return $instance ;
}
2014-03-31 16:58:40 +01:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'decorator_service' shared service .
2014-03-31 16:58:40 +01:00
*
2017-07-26 08:27:50 +01:00
* @ return \stdClass
2014-03-31 16:58:40 +01:00
*/
protected function getDecoratorServiceService ()
{
return $this -> services [ 'decorator_service' ] = new \stdClass ();
}
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'decorator_service_with_name' shared service .
2014-03-31 16:58:40 +01:00
*
2017-07-26 08:27:50 +01:00
* @ return \stdClass
2014-03-31 16:58:40 +01:00
*/
protected function getDecoratorServiceWithNameService ()
{
return $this -> services [ 'decorator_service_with_name' ] = new \stdClass ();
}
2015-08-07 17:08:40 +01:00
/**
2017-07-26 08:56:01 +01:00
* Gets the public 'deprecated_service' shared service .
2015-08-07 17:08:40 +01:00
*
2017-07-26 08:56:01 +01:00
* @ return \stdClass
2015-08-07 17:08:40 +01:00
*
2015-08-10 13:35:12 +01:00
* @ deprecated The " deprecated_service " service is deprecated . You should stop using it , as it will soon be removed .
2015-08-07 17:08:40 +01:00
*/
protected function getDeprecatedServiceService ()
{
2015-08-10 13:35:12 +01:00
@ trigger_error ( 'The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.' , E_USER_DEPRECATED );
2015-08-07 17:08:40 +01:00
return $this -> services [ 'deprecated_service' ] = new \stdClass ();
}
2013-01-05 08:50:11 +00:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'factory_service' shared service .
2013-01-05 08:50:11 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \Bar
2013-01-05 08:50:11 +00:00
*/
protected function getFactoryServiceService ()
{
2017-11-04 20:24:26 +00:00
$a = $ {( $_ = isset ( $this -> services [ 'foo.baz' ]) ? $this -> services [ 'foo.baz' ] : $this -> getFoo_BazService ()) && false ? : '_' };
if ( isset ( $this -> services [ 'factory_service' ])) {
return $this -> services [ 'factory_service' ];
}
return $this -> services [ 'factory_service' ] = $a -> getInstance ();
2013-01-05 08:50:11 +00:00
}
2016-04-30 11:40:11 +01:00
/**
2017-07-26 08:58:16 +01:00
* Gets the public 'factory_service_simple' shared service .
2016-04-30 11:40:11 +01:00
*
2017-07-26 08:58:16 +01:00
* @ return \Bar
2016-04-30 11:40:11 +01:00
*/
protected function getFactoryServiceSimpleService ()
{
2017-11-04 20:24:26 +00:00
$a = $ {( $_ = isset ( $this -> services [ 'factory_simple' ]) ? $this -> services [ 'factory_simple' ] : $this -> getFactorySimpleService ()) && false ? : '_' };
if ( isset ( $this -> services [ 'factory_service_simple' ])) {
return $this -> services [ 'factory_service_simple' ];
}
return $this -> services [ 'factory_service_simple' ] = $a -> getInstance ();
2016-04-30 11:40:11 +01:00
}
2013-01-05 08:50:11 +00:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'foo' shared service .
2013-01-05 08:50:11 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \Bar\FooClass
2013-01-05 08:50:11 +00:00
*/
protected function getFooService ()
{
2017-07-26 08:41:52 +01:00
$a = $ {( $_ = isset ( $this -> services [ 'foo.baz' ]) ? $this -> services [ 'foo.baz' ] : $this -> getFoo_BazService ()) && false ? : '_' };
2013-01-05 08:50:11 +00:00
2017-11-04 20:24:26 +00:00
if ( isset ( $this -> services [ 'foo' ])) {
return $this -> services [ 'foo' ];
}
2013-12-18 17:52:54 +00:00
$this -> services [ 'foo' ] = $instance = \Bar\FooClass :: getInstance ( 'foo' , $a , array ( 'bar' => 'foo is bar' , 'foobar' => 'bar' ), true , $this );
2013-01-05 08:50:11 +00:00
$instance -> foo = 'bar' ;
$instance -> moo = $a ;
2013-11-23 20:44:08 +00:00
$instance -> qux = array ( 'bar' => 'foo is bar' , 'foobar' => 'bar' );
2017-07-26 08:41:52 +01:00
$instance -> setBar ( $ {( $_ = isset ( $this -> services [ 'bar' ]) ? $this -> services [ 'bar' ] : $this -> getBarService ()) && false ? : '_' });
2016-11-19 11:21:18 +00:00
$instance -> initialize ();
2013-01-05 08:50:11 +00:00
sc_configure ( $instance );
return $instance ;
}
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'foo.baz' shared service .
2013-01-05 08:50:11 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \BazClass
2013-01-05 08:50:11 +00:00
*/
protected function getFoo_BazService ()
{
2013-12-18 14:16:42 +00:00
$this -> services [ 'foo.baz' ] = $instance = \BazClass :: getInstance ();
2013-01-05 08:50:11 +00:00
2013-12-18 14:16:42 +00:00
\BazClass :: configureStatic1 ( $instance );
2013-01-05 08:50:11 +00:00
return $instance ;
}
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'foo_bar' service .
2013-01-05 08:50:11 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \Bar\FooClass
2013-01-05 08:50:11 +00:00
*/
protected function getFooBarService ()
{
2017-07-26 08:41:52 +01:00
return new \Bar\FooClass ( $ {( $_ = isset ( $this -> services [ 'deprecated_service' ]) ? $this -> services [ 'deprecated_service' ] : $this -> getDeprecatedServiceService ()) && false ? : '_' });
2013-01-05 08:50:11 +00:00
}
2013-01-05 08:13:52 +00:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'foo_with_inline' shared service .
2013-01-05 08:13:52 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \Foo
2013-01-05 08:13:52 +00:00
*/
protected function getFooWithInlineService ()
{
$a = new \Bar ();
2017-01-27 15:27:34 +00:00
$this -> services [ 'foo_with_inline' ] = $instance = new \Foo ();
2017-02-16 22:39:07 +00:00
$a -> pub = 'pub' ;
2017-07-26 08:41:52 +01:00
$a -> setBaz ( $ {( $_ = isset ( $this -> services [ 'baz' ]) ? $this -> services [ 'baz' ] : $this -> getBazService ()) && false ? : '_' });
2017-02-16 22:39:07 +00:00
2013-01-05 08:13:52 +00:00
$instance -> setBar ( $a );
return $instance ;
}
2016-12-13 17:37:51 +00:00
/**
2017-07-26 08:58:57 +01:00
* Gets the public 'lazy_context' shared service .
2016-12-13 17:37:51 +00:00
*
2017-07-26 08:58:57 +01:00
* @ return \LazyContext
2016-12-13 17:37:51 +00:00
*/
protected function getLazyContextService ()
{
2017-01-29 19:10:36 +00:00
return $this -> services [ 'lazy_context' ] = new \LazyContext ( new RewindableGenerator ( function () {
2017-07-26 08:41:52 +01:00
yield 'k1' => $ {( $_ = isset ( $this -> services [ 'foo.baz' ]) ? $this -> services [ 'foo.baz' ] : $this -> getFoo_BazService ()) && false ? : '_' };
2017-04-21 10:31:17 +01:00
yield 'k2' => $this ;
2017-05-19 22:03:53 +01:00
}, 2 ), new RewindableGenerator ( function () {
return new \EmptyIterator ();
}, 0 ));
2016-12-13 17:37:51 +00:00
}
/**
2017-07-26 08:58:57 +01:00
* Gets the public 'lazy_context_ignore_invalid_ref' shared service .
2016-12-13 17:37:51 +00:00
*
2017-07-26 08:58:57 +01:00
* @ return \LazyContext
2016-12-13 17:37:51 +00:00
*/
protected function getLazyContextIgnoreInvalidRefService ()
{
2017-01-29 19:10:36 +00:00
return $this -> services [ 'lazy_context_ignore_invalid_ref' ] = new \LazyContext ( new RewindableGenerator ( function () {
2017-07-26 08:41:52 +01:00
yield 0 => $ {( $_ = isset ( $this -> services [ 'foo.baz' ]) ? $this -> services [ 'foo.baz' ] : $this -> getFoo_BazService ()) && false ? : '_' };
2017-05-19 22:03:53 +01:00
}, 1 ), new RewindableGenerator ( function () {
return new \EmptyIterator ();
}, 0 ));
2016-12-13 17:37:51 +00:00
}
2013-01-05 08:50:11 +00:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'method_call1' shared service .
2013-01-05 08:50:11 +00:00
*
2017-07-26 08:27:50 +01:00
* @ return \Bar\FooClass
2013-01-05 08:50:11 +00:00
*/
protected function getMethodCall1Service ()
{
require_once '%path%foo.php' ;
2013-12-18 17:52:54 +00:00
$this -> services [ 'method_call1' ] = $instance = new \Bar\FooClass ();
2013-01-05 08:50:11 +00:00
2017-07-26 08:41:52 +01:00
$instance -> setBar ( $ {( $_ = isset ( $this -> services [ 'foo' ]) ? $this -> services [ 'foo' ] : $this -> getFooService ()) && false ? : '_' });
2013-01-05 08:50:11 +00:00
$instance -> setBar ( NULL );
2017-07-26 08:41:52 +01:00
$instance -> setBar (( $ {( $_ = isset ( $this -> services [ 'foo' ]) ? $this -> services [ 'foo' ] : $this -> getFooService ()) && false ? : '_' } -> foo () . (( $this -> hasParameter ( " foo " )) ? ( $this -> getParameter ( " foo " )) : ( " default " ))));
2013-01-05 08:50:11 +00:00
return $instance ;
}
2014-04-13 16:18:39 +01:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'new_factory_service' shared service .
2014-04-13 16:18:39 +01:00
*
2017-07-26 08:27:50 +01:00
* @ return \FooBarBaz
2014-04-13 16:18:39 +01:00
*/
protected function getNewFactoryServiceService ()
{
2015-03-23 18:17:24 +00:00
$a = new \FactoryClass ();
$a -> foo = 'bar' ;
$this -> services [ 'new_factory_service' ] = $instance = $a -> getInstance ();
2014-04-13 16:18:39 +01:00
$instance -> foo = 'bar' ;
return $instance ;
}
2014-09-27 17:06:30 +01:00
/**
2017-07-26 08:27:50 +01:00
* Gets the public 'service_from_static_method' shared service .
2014-09-27 17:06:30 +01:00
*
2017-07-26 08:27:50 +01:00
* @ return \Bar\FooClass
2014-09-27 17:06:30 +01:00
*/
protected function getServiceFromStaticMethodService ()
{
return $this -> services [ 'service_from_static_method' ] = \Bar\FooClass :: getInstance ();
}
2017-03-28 11:05:21 +01:00
/**
* 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 ));
}
2017-07-26 08:41:52 +01:00
/**
* 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' );
}
2017-03-28 11:05:21 +01:00
/**
* Gets the private 'tagged_iterator_foo' shared service .
*
* @ return \Bar
*/
protected function getTaggedIteratorFooService ()
{
return $this -> services [ 'tagged_iterator_foo' ] = new \Bar ();
}
2013-01-05 08:50:11 +00:00
public function getParameter ( $name )
{
2017-06-12 12:31:43 +01:00
if ( ! ( isset ( $this -> parameters [ $name ]) || isset ( $this -> loadedDynamicParameters [ $name ]) || array_key_exists ( $name , $this -> parameters ))) {
2017-08-12 10:16:19 +01:00
$name = $this -> normalizeParameterName ( $name );
2013-01-05 08:50:11 +00:00
2017-06-12 12:31:43 +01:00
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 ));
}
2013-01-05 08:50:11 +00:00
}
2016-08-12 19:34:27 +01:00
if ( isset ( $this -> loadedDynamicParameters [ $name ])) {
return $this -> loadedDynamicParameters [ $name ] ? $this -> dynamicParameters [ $name ] : $this -> getDynamicParameter ( $name );
}
2013-01-05 08:50:11 +00:00
2014-12-03 08:59:38 +00:00
return $this -> parameters [ $name ];
2013-01-05 08:50:11 +00:00
}
public function hasParameter ( $name )
{
2017-08-12 10:16:19 +01:00
$name = $this -> normalizeParameterName ( $name );
2013-01-13 19:19:05 +00:00
2017-06-12 12:31:43 +01:00
return isset ( $this -> parameters [ $name ]) || isset ( $this -> loadedDynamicParameters [ $name ]) || array_key_exists ( $name , $this -> parameters );
2013-01-05 08:50:11 +00:00
}
public function setParameter ( $name , $value )
{
2013-01-05 15:29:42 +00:00
throw new LogicException ( 'Impossible to call set() on a frozen ParameterBag.' );
2013-01-05 08:50:11 +00:00
}
public function getParameterBag ()
{
if ( null === $this -> parameterBag ) {
2016-08-12 19:34:27 +01:00
$parameters = $this -> parameters ;
foreach ( $this -> loadedDynamicParameters as $name => $loaded ) {
$parameters [ $name ] = $loaded ? $this -> dynamicParameters [ $name ] : $this -> getDynamicParameter ( $name );
}
$this -> parameterBag = new FrozenParameterBag ( $parameters );
2013-01-05 08:50:11 +00:00
}
return $this -> parameterBag ;
}
2014-12-12 16:21:40 +00:00
2016-08-12 19:34:27 +01:00
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 ));
}
2017-08-12 10:16:19 +01:00
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 version 3.4.' , $name , $normalizedName ), E_USER_DEPRECATED );
}
} else {
$normalizedName = $this -> normalizedParameterNames [ $normalizedName ] = ( string ) $name ;
}
return $normalizedName ;
}
2013-01-05 08:50:11 +00:00
/**
* Gets the default parameters .
*
* @ return array An array of the default parameters
*/
protected function getDefaultParameters ()
{
return array (
'baz_class' => 'BazClass' ,
2013-12-18 17:52:54 +00:00
'foo_class' => 'Bar\\FooClass' ,
2013-01-05 08:50:11 +00:00
'foo' => 'bar' ,
);
}
}