PHP Class Psecio\Jwt\ClaimsCollection

Inheritance: implements Countable, implements Iterator
Show file Open project: psecio/jwt Class Usage Examples

Public Methods

Method Description
add ( Claim $claim ) : ClaimsCollection Add a claim to the collection
count ( ) : integer Return a count of the current data
current ( ) : mixed Return the current item in the set
key ( ) : integer Return the current key (position) value
next ( ) : integer Get the next position value
rewind ( ) Rewind to the beginning of the set (position = 0)
toArray ( ) : array Convert the collection to a nested array
valid ( ) : boolean See if the requested position exists in the data

Method Details

add() public method

Add a claim to the collection
public add ( Claim $claim ) : ClaimsCollection
$claim Claim Claim instance
return ClaimsCollection instance

count() public method

Return a count of the current data
public count ( ) : integer
return integer Count result

current() public method

Return the current item in the set
public current ( ) : mixed
return mixed Current data item

key() public method

Return the current key (position) value
public key ( ) : integer
return integer Position value

next() public method

Get the next position value
public next ( ) : integer
return integer Next position

rewind() public method

Rewind to the beginning of the set (position = 0)
public rewind ( )

toArray() public method

Convert the collection to a nested array
public toArray ( ) : array
return array Contents of the collection

valid() public method

See if the requested position exists in the data
public valid ( ) : boolean
return boolean Exists/doesn't exist