本文整理匯總了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);
}
示例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');
}
示例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();
}
示例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();
}
示例5: __construct
/**
* Constructor
*/
public function __construct(FileLocator $importLocator)
{
$this->registerExtension(new ImportExtension($this));
$this->setImportLocator($importLocator);
parent::__construct();
}
示例6: __construct
/**
* {@inheritdoc}
*/
public function __construct(ParameterBagInterface $parameterBag = NULL)
{
$this->setResourceTracking(FALSE);
parent::__construct($parameterBag);
}
示例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);
}
示例8: __construct
/**
* Construct object.
*
* @param array $options The default options
*/
public function __construct($options = array())
{
parent::__construct(new ParameterBag($options));
}
示例9: __construct
public function __construct(ParameterBagInterface $parameterBag = null)
{
parent::__construct($parameterBag);
$this->registerDefaultServices($this->defaultSettings);
}
示例10: __construct
public function __construct(ParameterBagInterface $parameterBag = NULL)
{
parent::__construct($parameterBag);
$this->druponyInitialize();
}