PHP 클래스 Pantheon\Terminus\Session\Session

상속: implements League\Container\ContainerAwareInterface, implements Robo\Contract\ConfigAwareInterface, implements Pantheon\Terminus\DataStore\DataStoreAwareInterface, use trait Robo\Common\ConfigAwareTrait, use trait League\Container\ContainerAwareTrait, use trait Pantheon\Terminus\DataStore\DataStoreAwareTrait
파일 보기 프로젝트 열기: pantheon-systems/terminus 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$tokens Pantheon\Terminus\Collections\SavedTokens

보호된 프로퍼티들

프로퍼티 타입 설명
$data object

공개 메소드들

메소드 설명
__construct ( Pantheon\Terminus\DataStore\DataStoreInterface $data_store ) Instantiates object, sets session data, instantiates a SavedTokens instance
destroy ( ) Removes the session from the cache
get ( string $key ) : mixed Returns given data property or default if DNE.
getTokens ( ) : SavedTokens
getUser ( ) : User Returns a user with the current session user id
isActive ( ) : boolean Responds with the status of this session (i.e. whether the client is logged in)
setData ( array $data ) Saves session data to cache
setDataStore ( Pantheon\Terminus\DataStore\DataStoreInterface $data_store )

메소드 상세

__construct() 공개 메소드

Instantiates object, sets session data, instantiates a SavedTokens instance
public __construct ( Pantheon\Terminus\DataStore\DataStoreInterface $data_store )
$data_store Pantheon\Terminus\DataStore\DataStoreInterface An object to persist the session data.

destroy() 공개 메소드

Removes the session from the cache
public destroy ( )

get() 공개 메소드

Returns given data property or default if DNE.
public get ( string $key ) : mixed
$key string Name of property to return
리턴 mixed

getTokens() 공개 메소드

public getTokens ( ) : SavedTokens
리턴 Pantheon\Terminus\Collections\SavedTokens

getUser() 공개 메소드

Returns a user with the current session user id
public getUser ( ) : User
리턴 Pantheon\Terminus\Models\User [user] $session user

isActive() 공개 메소드

Responds with the status of this session (i.e. whether the client is logged in)
public isActive ( ) : boolean
리턴 boolean

setData() 공개 메소드

Saves session data to cache
public setData ( array $data )
$data array Session data to save

setDataStore() 공개 메소드

public setDataStore ( Pantheon\Terminus\DataStore\DataStoreInterface $data_store )
$data_store Pantheon\Terminus\DataStore\DataStoreInterface

프로퍼티 상세

$data 보호되어 있는 프로퍼티

protected object $data
리턴 object

$tokens 공개적으로 프로퍼티

public SavedTokens,Pantheon\Terminus\Collections $tokens
리턴 Pantheon\Terminus\Collections\SavedTokens