PHP Class PSR7Sessions\Storageless\Session\DefaultSessionData

Inheritance: implements PSR7Sessions\Storageless\Session\SessionInterface
Show file Open project: Ocramius/PSR7Session Class Usage Examples

Public Methods

Method Description
clear ( ) {@inheritDoc}
fromDecodedTokenData ( stdClass $data ) : self
fromTokenData ( array $data ) : self
get ( string $key, $default = null ) {@inheritDoc}
has ( string $key ) : boolean {@inheritDoc}
hasChanged ( ) : boolean {@inheritDoc}
isEmpty ( ) : boolean {@inheritDoc}
jsonSerialize ( ) {@inheritDoc}
newEmptySession ( ) : self
remove ( string $key ) {@inheritDoc}
set ( string $key, $value ) {@inheritDoc}

Private Methods

Method Description
__construct ( ) Instantiation via __construct is not allowed, use - {@see DefaultSessionData::fromDecodedTokenData} - {@see DefaultSessionData::fromTokenData} - {@see DefaultSessionData::newEmptySession} instead
convertValueToScalar ( integer | boolean | string | float | array | object | JsonSerializable $value ) : integer | boolean | string | float | array

Method Details

clear() public method

{@inheritDoc}
public clear ( )

fromDecodedTokenData() public static method

public static fromDecodedTokenData ( stdClass $data ) : self
$data stdClass
return self

fromTokenData() public static method

public static fromTokenData ( array $data ) : self
$data array
return self

get() public method

{@inheritDoc}
public get ( string $key, $default = null )
$key string

has() public method

{@inheritDoc}
public has ( string $key ) : boolean
$key string
return boolean

hasChanged() public method

{@inheritDoc}
public hasChanged ( ) : boolean
return boolean

isEmpty() public method

{@inheritDoc}
public isEmpty ( ) : boolean
return boolean

jsonSerialize() public method

{@inheritDoc}
public jsonSerialize ( )

newEmptySession() public static method

public static newEmptySession ( ) : self
return self

remove() public method

{@inheritDoc}
public remove ( string $key )
$key string

set() public method

{@inheritDoc}
public set ( string $key, $value )
$key string