PHP Class Cartalyst\Sentinel\Sessions\NativeSession

Inheritance: implements Cartalyst\Sentinel\Sessions\SessionInterface
ファイルを表示 Open project: cartalyst/sentinel Class Usage Examples

Protected Properties

Property Type Description
$key string The session key.

Public Methods

Method Description
__construct ( string $key = null ) : void Creates a new native session driver for Sentinel.
__destruct ( ) : void Called upon destruction of the native session handler.
forget ( ) {@inheritDoc}
get ( ) {@inheritDoc}
put ( $value ) {@inheritDoc}

Protected Methods

Method Description
forgetSession ( ) : void Forgets the Sentinel session from the global $_SESSION.
getSession ( ) : mixed. Unserializes a value from the session and returns it.
setSession ( mixed $value ) : void Interacts with the $_SESSION global to set a property on it.
startSession ( ) : void Starts the session if it does not exist.
writeSession ( ) : void Writes the session.

Method Details

__construct() public method

Creates a new native session driver for Sentinel.
public __construct ( string $key = null ) : void
$key string
return void

__destruct() public method

Called upon destruction of the native session handler.
public __destruct ( ) : void
return void

forget() public method

{@inheritDoc}
public forget ( )

forgetSession() protected method

Forgets the Sentinel session from the global $_SESSION.
protected forgetSession ( ) : void
return void

get() public method

{@inheritDoc}
public get ( )

getSession() protected method

Unserializes a value from the session and returns it.
protected getSession ( ) : mixed.
return mixed.

put() public method

{@inheritDoc}
public put ( $value )

setSession() protected method

The property is serialized initially.
protected setSession ( mixed $value ) : void
$value mixed
return void

startSession() protected method

Starts the session if it does not exist.
protected startSession ( ) : void
return void

writeSession() protected method

Writes the session.
protected writeSession ( ) : void
return void

Property Details

$key protected_oe property

The session key.
protected string $key
return string