当前位置: 首页>>代码示例>>PHP>>正文


PHP Container::__construct方法代码示例

本文整理汇总了PHP中Symfony\Component\DependencyInjection\Container::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::__construct方法的具体用法?PHP Container::__construct怎么用?PHP Container::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\DependencyInjection\Container的用法示例。


在下文中一共展示了Container::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct(new ParameterBag($this->getDefaultParameters()));
     $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', 'method_call1' => 'getMethodCall1Service', 'new_factory' => 'getNewFactoryService', 'new_factory_service' => 'getNewFactoryServiceService', 'request' => 'getRequestService', 'service_from_static_method' => 'getServiceFromStaticMethodService');
     $this->privates = array('configurator_service' => true, 'configurator_service_simple' => true, 'factory_simple' => true, 'inlined' => true, 'new_factory' => true);
     $this->aliases = array('alias_for_alias' => 'foo', 'alias_for_foo' => 'foo');
 }
开发者ID:Gladhon,项目名称:symfony,代码行数:10,代码来源:services9.php

示例2: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     $this->parameters = array('baz_class' => 'BazClass', 'foo_class' => 'Bar\\FooClass', 'foo' => 'bar');
     parent::__construct(new ParameterBag($this->parameters));
     $this->methodMap = array('bar' => 'getBarService', 'baz' => 'getBazService', 'configurator_service' => 'getConfiguratorServiceService', 'configured_service' => 'getConfiguredServiceService', 'decorated' => 'getDecoratedService', 'decorator_service' => 'getDecoratorServiceService', 'decorator_service_with_name' => 'getDecoratorServiceWithNameService', 'depends_on_request' => 'getDependsOnRequestService', 'factory_service' => 'getFactoryServiceService', 'foo' => 'getFooService', 'foo.baz' => 'getFoo_BazService', 'foo_bar' => 'getFooBarService', 'foo_with_inline' => 'getFooWithInlineService', 'inlined' => 'getInlinedService', 'method_call1' => 'getMethodCall1Service', 'new_factory' => 'getNewFactoryService', 'new_factory_service' => 'getNewFactoryServiceService', 'request' => 'getRequestService', 'service_from_static_method' => 'getServiceFromStaticMethodService');
     $this->aliases = array('alias_for_alias' => 'foo', 'alias_for_foo' => 'foo');
 }
开发者ID:eacquah,项目名称:lolgh,代码行数:10,代码来源:services9.php

示例3: __construct

 /**
  * Constructor
  * @param ParameterBagInterface $parameterBag
  */
 public function __construct(ParameterBagInterface $parameterBag = null)
 {
     parent::__construct($parameterBag);
     $passes = array();
     $passes[] = new MergeExtensionConfigurationPass();
     $passes[] = new ResolveInterfaceInjectorsPass();
     $this->compilerPasses = $passes;
 }
开发者ID:spf13,项目名称:symfony,代码行数:12,代码来源:ContainerBuilder.php

示例4: __construct

 /**
  * Constructor
  * @param ParameterBagInterface $parameterBag
  */
 public function __construct(ParameterBagInterface $parameterBag = null)
 {
     parent::__construct($parameterBag);
     $this->compiler = new Compiler();
     foreach ($this->compiler->getPassConfig()->getPasses() as $pass) {
         $this->addObjectResource($pass);
     }
 }
开发者ID:notbrain,项目名称:symfony,代码行数:12,代码来源:ContainerBuilder.php

示例5: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct(new ParameterBag($this->getDefaultParameters()));
     $this->methodMap = array(
         'bar' => 'getBarService',
         'baz' => 'getBazService',
         'depends_on_request' => 'getDependsOnRequestService',
         'factory_service' => 'getFactoryServiceService',
         'foo' => 'getFooService',
         'foo.baz' => 'getFoo_BazService',
         'foo_bar' => 'getFooBarService',
         'foo_with_inline' => 'getFooWithInlineService',
         'inlined' => 'getInlinedService',
         'method_call1' => 'getMethodCall1Service',
         'request' => 'getRequestService',
     );
     $this->aliases = array(
         'alias_for_alias' => 'foo',
         'alias_for_foo' => 'foo',
     );
 }
开发者ID:Gregwar,项目名称:symfony,代码行数:24,代码来源:services9.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     $this->__bar = new \stdClass();
     $this->__foo_bar = new \stdClass();
     $this->__foo_baz = new \stdClass();
 }
开发者ID:laubosslink,项目名称:lab,代码行数:7,代码来源:ContainerTest.php

示例7: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     $this->parameters = array('foo' => '%baz%', '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'));
     parent::__construct(new ParameterBag($this->parameters));
 }
开发者ID:eacquah,项目名称:lolgh,代码行数:8,代码来源:services8.php

示例8: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
 }
开发者ID:BusinessCookies,项目名称:CoffeeMachineProject,代码行数:7,代码来源:services1.php

示例9: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->methodMap = array('service_from_anonymous_factory' => 'getServiceFromAnonymousFactoryService', 'service_with_method_call_and_factory' => 'getServiceWithMethodCallAndFactoryService');
 }
开发者ID:unexge,项目名称:symfony,代码行数:8,代码来源:services19.php

示例10: __construct

 /**
  * Constructor.
  */
 public function __construct()
 {
     parent::__construct();
     $this->methodMap = array('foo' => 'getFooService');
 }
开发者ID:Kyra2778,项目名称:AMR,代码行数:8,代码来源:services24.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->__bar = new \stdClass();
     $this->__foo_bar = new \stdClass();
     $this->__foo_baz = new \stdClass();
     $this->__internal = new \stdClass();
     $this->privates = array('internal' => true);
     $this->aliases = array('alias' => 'bar');
 }
开发者ID:blazarecki,项目名称:symfony,代码行数:10,代码来源:ContainerTest.php

示例12: __construct

 /**
  * @inheritdoc
  */
 public function __construct(ParameterBagInterface $parameterBag = null)
 {
     // This is not elegant, but it works.
     parent::__construct(new DrupalFrozenParameterBag($parameterBag->all()));
     $this->services['service_container'] = $this;
 }
开发者ID:makinacorpus,项目名称:drupal-sf-dic,代码行数:9,代码来源:Container.php

示例13: __construct

 /**
  * Construct object.
  *
  * @param array $options The default options
  */
 public function __construct($options = array())
 {
     parent::__construct(new ParameterBag($options));
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:9,代码来源:ContainerBuilder.php

示例14: __construct

 /**
  * Constructor
  * @param ParameterBagInterface $parameterBag
  */
 public function __construct(ParameterBagInterface $parameterBag = null)
 {
     parent::__construct($parameterBag);
 }
开发者ID:GromNaN,项目名称:GitWikiApp,代码行数:8,代码来源:ContainerBuilder.php

示例15: __construct

 /**
  * Constructor
  * @param ParameterBagInterface $parameterBag
  */
 public function __construct(ParameterBagInterface $parameterBag = null)
 {
     parent::__construct($parameterBag);
     $this->compilerPassConfig = new PassConfig();
 }
开发者ID:jackbravo,项目名称:symfony-sandbox,代码行数:9,代码来源:ContainerBuilder.php


注:本文中的Symfony\Component\DependencyInjection\Container::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。