本文整理匯總了PHP中Header::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Header::__construct方法的具體用法?PHP Header::__construct怎麽用?PHP Header::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Header
的用法示例。
在下文中一共展示了Header::__construct方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Constructor
*
* @param Header ...$headers One or more headers to merge
*/
public function __construct(Header ...$headers)
{
$params = array();
foreach ($headers as $header) {
foreach ($header->parameters() as $param) {
if (isset($params[$param->name()])) {
throw new \UnexpectedValueException("Duplicate parameter.");
}
$params[$param->name()] = $param;
}
}
parent::__construct(...array_values($params));
}
示例2: __construct
/**
* Constructor
*
* @param string policyref
*/
public function __construct($policyref)
{
parent::__construct('P3P', NULL);
$this->policyref = $policyref;
}
示例3: __construct
/**
*
* @param string $id
* @param array $attributes
* @param array $items
* @param string $theme
* @param string $title
* @param string $position
* @param boolean $group
*/
public function __construct($id = '', $attributes = array(), $items = array(), $theme = '', $title = '', $position = 'inline', $group = false)
{
parent::__construct($id, $attributes, $items, $theme, $title, $position);
$this->_role = $this->attribute('data-role', 'footer', true);
$this->group($group);
}
示例4: __construct
/**
* Defines the `filename` parameter.
*
* @inheritdoc
*/
public function __construct($value = null, array $attributes = [])
{
$this->parameters['filename'] = new HeaderParameter('filename');
parent::__construct($value, $attributes);
}
示例5: __construct
/**
* Content constructor.
*
* @param string $type
*/
public function __construct(string $type)
{
parent::__construct('Content-Type', $type);
}
示例6: __construct
/**
* Constructor
*
* @param string user
* @param string pass
*/
public function __construct($user, $pass)
{
$this->user = $user;
$this->pass = $pass;
parent::__construct('Authorization', 'Basic');
}
示例7: __construct
public function __construct($contentType)
{
parent::__construct("Content-Type", $contentType);
}