當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ContainerBuilder::__construct方法代碼示例

本文整理匯總了PHP中Symfony\Component\DependencyInjection\ContainerBuilder::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP ContainerBuilder::__construct方法的具體用法?PHP ContainerBuilder::__construct怎麽用?PHP ContainerBuilder::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Symfony\Component\DependencyInjection\ContainerBuilder的用法示例。


在下文中一共展示了ContainerBuilder::__construct方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * @param Application     $application
  * @param InputInterface  $input
  * @param OutputInterface $output
  */
 public function __construct(Application $application, InputInterface $input, OutputInterface $output)
 {
     parent::__construct();
     $this->set('application', $application);
     $this->set('helper_set', $application->getHelperSet());
     $this->set('input', $input);
     $this->set('output', $output);
 }
開發者ID:kangkot,項目名稱:bldr,代碼行數:13,代碼來源:ContainerBuilder.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $fileLocator = new FileLocator(__DIR__ . '/../../config/');
     $resolver = new LoaderResolver(array(new XmlFileLoader($this, $fileLocator), new YamlFileLoader($this, $fileLocator)));
     $loader = new DelegatingLoader($resolver);
     $loader->load('services.yml');
 }
開發者ID:garyr,項目名稱:portunus,代碼行數:8,代碼來源:ContainerBuilder.php

示例3: __construct

 /**
  * ServiceContainerBuilder constructor.
  * @param ApplicationPath $applicationPath
  * @param SymfonyRequest $symfonyRequest
  * @param string $applicationMode
  * @param bool $allModules
  */
 public function __construct(ApplicationPath $applicationPath, SymfonyRequest $symfonyRequest, $applicationMode, $allModules = false)
 {
     parent::__construct();
     $this->applicationPath = $applicationPath;
     $this->symfonyRequest = $symfonyRequest;
     $this->applicationMode = $applicationMode;
     $this->allModules = $allModules;
     $this->setUpContainer();
 }
開發者ID:acp3,項目名稱:core,代碼行數:16,代碼來源:ServiceContainerBuilder.php

示例4: __construct

 public function __construct($mode = PhpcrShell::MODE_STANDALONE)
 {
     parent::__construct();
     $this->mode = $mode;
     $this->set('container', $this);
     $this->registerHelpers();
     $this->registerConfig();
     $this->registerPhpcr();
     $this->registerEvent();
     $this->registerConsole();
     $this->registerQuery();
 }
開發者ID:hason,項目名稱:phpcr-shell,代碼行數:12,代碼來源:Container.php

示例5: __construct

 /**
  * Constructor
  */
 public function __construct(FileLocator $importLocator)
 {
     $this->registerExtension(new ImportExtension($this));
     $this->setImportLocator($importLocator);
     parent::__construct();
 }
開發者ID:thinframe,項目名稱:applications,代碼行數:9,代碼來源:ApplicationContainerBuilder.php

示例6: __construct

 /**
  * {@inheritdoc}
  */
 public function __construct(ParameterBagInterface $parameterBag = NULL)
 {
     $this->setResourceTracking(FALSE);
     parent::__construct($parameterBag);
 }
開發者ID:HakS,項目名稱:drupal8_training,代碼行數:8,代碼來源:ContainerBuilder.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param ParameterBagInterface $parameterBag A ParameterBagInterface instance
  * @param array $diDefinitions
  *
  * @api
  */
 public function __construct(ParameterBagInterface $parameterBag = null, array $diDefinitions)
 {
     $this->definitions = $diDefinitions;
     parent::__construct($parameterBag);
 }
開發者ID:Rastusik,項目名稱:Symfony2-Bridge,代碼行數:13,代碼來源:SymfonyContainerBuilderBridge.php

示例8: __construct

 /**
  * Construct object.
  *
  * @param array $options The default options
  */
 public function __construct($options = array())
 {
     parent::__construct(new ParameterBag($options));
 }
開發者ID:nidzix,項目名稱:Newscoop,代碼行數:9,代碼來源:ContainerBuilder.php

示例9: __construct

 public function __construct(ParameterBagInterface $parameterBag = null)
 {
     parent::__construct($parameterBag);
     $this->registerDefaultServices($this->defaultSettings);
 }
開發者ID:leroy0211,項目名稱:Slim-Symfony-Dependency-Injection-Bridge,代碼行數:5,代碼來源:ContainerBuilder.php

示例10: __construct

 public function __construct(ParameterBagInterface $parameterBag = NULL)
 {
     parent::__construct($parameterBag);
     $this->druponyInitialize();
 }
開發者ID:frizinak,項目名稱:drupony,代碼行數:5,代碼來源:DruponyContainerBuilder.php


注:本文中的Symfony\Component\DependencyInjection\ContainerBuilder::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。