예제 #1
0
파일: JOSE.php 프로젝트: 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));
 }
예제 #2
0
 /**
  * Constructor
  *
  * @param   string policyref
  */
 public function __construct($policyref)
 {
     parent::__construct('P3P', NULL);
     $this->policyref = $policyref;
 }
예제 #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);
 }
예제 #4
0
 /**
  * Defines the `filename` parameter.
  *
  * @inheritdoc
  */
 public function __construct($value = null, array $attributes = [])
 {
     $this->parameters['filename'] = new HeaderParameter('filename');
     parent::__construct($value, $attributes);
 }
예제 #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');
 }
예제 #7
0
 public function __construct($contentType)
 {
     parent::__construct("Content-Type", $contentType);
 }