PHP Class Psecio\Jwt\Claim

Show file Open project: psecio/jwt

Protected Properties

Property Type Description
$name string Claim "name" (ex. audience or issuer)
$type string Claim type
$value string Claim value

Public Methods

Method Description
__construct ( string $value, string $type = null ) Initialize the claim with the given value
getName ( ) : string Get the name value for the current instance
getType ( ) : string Get the current claim type
getValue ( ) : string Get the current value
setValue ( string $value ) : Claim Set the claim value
toArray ( ) : array Transform claim data into an array

Method Details

__construct() public method

Initialize the claim with the given value
public __construct ( string $value, string $type = null )
$value string Claim value
$type string Type value [optional]

getName() public method

Get the name value for the current instance
public getName ( ) : string
return string Name value

getType() public method

Get the current claim type
public getType ( ) : string
return string Claim type

getValue() public method

Get the current value
public getValue ( ) : string
return string Claim value

setValue() public method

Set the claim value
public setValue ( string $value ) : Claim
$value string Claim value
return Claim instance

toArray() public method

Transform claim data into an array
public toArray ( ) : array
return array Claim data

Property Details

$name protected property

Claim "name" (ex. audience or issuer)
protected string $name
return string

$type protected property

Claim type
protected string $type
return string

$value protected property

Claim value
protected string $value
return string