/** * Constructor. * * @param array $header An associative array of headers. The value can be any type accepted by json_encode or a JSON serializable object * * @see http://php.net/manual/en/function.json-encode.php * @see http://php.net/manual/en/jsonserializable.jsonserialize.php * @see https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-4 * } */ public function __construct($header = array()) { if (!isset($header['typ'])) { $header['typ'] = 'JWS'; } parent::__construct($header); }
/** * Constructor. * * @param array $header An associative array of headers. The value can be any type accepted by json_encode or a JSON serializable object * * @see http://php.net/manual/en/function.json-encode.php * @see http://php.net/manual/en/jsonserializable.jsonserialize.php * @see https://tools.ietf.org/html/draft-ietf-jose-json-web-signature-41#section-4 * } */ public function __construct($header = array(), $encryptionEngine = 'OpenSSL') { if (!isset($header['typ'])) { $header['typ'] = 'JWS'; } parent::__construct($header, $encryptionEngine); }