Exemple #1
0
Fichier : JOSE.php Projet : sop/jwx
 /**
  * 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));
 }
 /**
  * Constructor
  *
  * @param   string policyref
  */
 public function __construct($policyref)
 {
     parent::__construct('P3P', NULL);
     $this->policyref = $policyref;
 }
Exemple #3
0
 /**
  *
  * @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);
 }
 /**
  * Defines the `filename` parameter.
  *
  * @inheritdoc
  */
 public function __construct($value = null, array $attributes = [])
 {
     $this->parameters['filename'] = new HeaderParameter('filename');
     parent::__construct($value, $attributes);
 }
Exemple #5
0
 /**
  * Content constructor.
  *
  * @param string $type
  */
 public function __construct(string $type)
 {
     parent::__construct('Content-Type', $type);
 }
 /**
  * Constructor
  *
  * @param   string user
  * @param   string pass
  */
 public function __construct($user, $pass)
 {
     $this->user = $user;
     $this->pass = $pass;
     parent::__construct('Authorization', 'Basic');
 }
 public function __construct($contentType)
 {
     parent::__construct("Content-Type", $contentType);
 }