PHP 클래스 Webiny\Component\Http\Session

상속: use trait Webiny\Component\StdLib\StdLibTrait, use trait Webiny\Component\StdLib\SingletonTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
delete ( string $key ) : boolean Removes the given $key from session.
get ( string $key, mixed $value = null ) : string Get a session value for the given $key.
getAll ( ) : array Get all session values.
getConfig ( ) : ConfigObject Returns session config from Http object.
getSessionId ( ) : string Get current session id.
save ( string $key, mixed $value ) Save, or overwrite, a session value under the given $key with the given $value.

보호된 메소드들

메소드 설명
init ( ) Constructor.

메소드 상세

delete() 공개 메소드

Removes the given $key from session.
public delete ( string $key ) : boolean
$key string Name of the session key you wish to remove.
리턴 boolean

get() 공개 메소드

If key doesn't not exist, $value will be returned and assigned under that key.
public get ( string $key, mixed $value = null ) : string
$key string Key for which you wish to get the value.
$value mixed Default value that will be returned if $key doesn't exist.
리턴 string Value of the given $key.

getAll() 공개 메소드

Get all session values.
public getAll ( ) : array
리턴 array Key-value array of all session entries.

getConfig() 공개 정적인 메소드

Returns session config from Http object.
public static getConfig ( ) : ConfigObject
리턴 Webiny\Component\Config\ConfigObject

getSessionId() 공개 메소드

Get current session id.
public getSessionId ( ) : string
리턴 string Session id.

init() 보호된 메소드

Constructor.
protected init ( )

save() 공개 메소드

Save, or overwrite, a session value under the given $key with the given $value.
public save ( string $key, mixed $value )
$key string Key for which you wish to get the value.
$value mixed Value that will be stored under the $key.