本文整理汇总了PHP中Symfony\Component\HttpFoundation\ParameterBag::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ParameterBag::__construct方法的具体用法?PHP ParameterBag::__construct怎么用?PHP ParameterBag::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\HttpFoundation\ParameterBag
的用法示例。
在下文中一共展示了ParameterBag::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param array $headers An array of HTTP files
*/
public function __construct(array $parameters = array())
{
// this line is not necessary, but including it avoids any stupid
// errors if we add code to the parent's constructor
parent::__construct();
$this->replace($parameters);
}
示例2: __construct
/**
* @param OriginInterface $origin
* @param Feed $feed
* @param string $originalId
* @param array $parameters
*/
public function __construct(OriginInterface $origin, Feed $feed, $originalId, array $parameters = [])
{
parent::__construct($parameters);
$this->origin = $origin;
$this->originalId = $originalId;
$this->feed = $feed;
}
示例3: __construct
/**
* Constructor.
*
* @param array $config
*/
public function __construct(array $config)
{
parent::__construct($config);
foreach ($config['locales'] as $name => $parameters) {
$this->parameters['locales'][$name] = new Locale($parameters);
}
}
示例4: __construct
/**
* Constructor.
*
* @param JsonFile $composerJson
* @param array $composerOverrides
* @param bool $setDefaults
*/
public function __construct(JsonFile $composerJson, array $composerOverrides, $setDefaults = true)
{
parent::__construct($composerOverrides);
/** @var Filesystem $extensionFs */
$extensionFs = $composerJson->getFilesystem();
/** @var Local $adapter */
$adapter = $extensionFs->getAdapter();
$this->set('baseDir', $adapter->getPathPrefix());
$this->set('composerJson', $composerJson);
}
示例5: __construct
public function __construct(array $parameters)
{
parent::__construct($parameters);
$this->set('addons', new ParameterBag($parameters['addons']));
$this->set('labels', new ParameterBag($parameters['labels']));
$this->set('placeholders', new ParameterBag($parameters['placeholders']));
$templates = new ParameterBag();
foreach ($parameters['templates'] as $type => $values) {
$templates->set($type, new ParameterBag($parameters['templates'][$type]));
}
$this->set('templates', $templates);
}
示例6: __construct
public function __construct(\Closure $legacyKernelClosure)
{
$this->legacyKernelClosure = $legacyKernelClosure;
parent::__construct();
}
示例7: __construct
/**
* {@inheritdoc}
*/
public function __construct(array $parameters = array())
{
parent::__construct($parameters);
}
示例8: __construct
/**
* @param string $transactionId
* @param array $transactionData
*/
public function __construct($transactionId, array $transactionData)
{
$this->transaction_id = $transactionId;
parent::__construct($transactionData);
}
示例9: __construct
public function __construct($parameters = array())
{
$this->namespaces = array_unique(array_merge(array_keys($parameters), $this->protected_namespaces));
parent::__construct($parameters);
}