PHP 클래스 Bluz\Session\Session

저자: Anton Shevchuk
상속: use trait Bluz\Common\Options
파일 보기 프로젝트 열기: bluzphp/framework 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$adapter Session save handler
$name value returned by session_name()
$namespace namespace

공개 메소드들

메소드 설명
contains ( string $key ) : boolean Isset
cookieExists ( ) : boolean Returns true if session ID is set
delete ( string $key ) : void Unset
destroy ( ) : void Destroy/end a session
expireSessionCookie ( ) : void Expire the session cookie
get ( string $key ) : mixed Get value by key
getAdapter ( ) : SessionHandlerInterface Get SaveHandler Object
getId ( ) : string Get session ID
getName ( ) : string Get session name
getNamespace ( ) : string Get Namespace
regenerateId ( boolean $deleteOldSession = true ) : boolean Regenerate id
sessionExists ( ) : boolean Does a session started and is it currently active?
set ( string $key, mixed $value ) : void Set key/value pair
setAdapter ( SessionHandlerInterface $saveHandler ) : Session Set session save handler object
setId ( string $id ) : Session Set session ID
setName ( string $name ) : Session Attempt to set the session name
setNamespace ( string $namespace ) : Session Set Namespace
setSessionCookieLifetime ( integer $ttl ) : void Set the session cookie lifetime
start ( ) : void Start session

보호된 메소드들

메소드 설명
initAdapter ( ) : boolean Register Save Handler with ext/session
setSavePath ( string $savePath ) : Session Set session save path

메소드 상세

contains() 공개 메소드

Isset
public contains ( string $key ) : boolean
$key string
리턴 boolean

cookieExists() 공개 메소드

Returns true if session ID is set
public cookieExists ( ) : boolean
리턴 boolean

delete() 공개 메소드

Unset
public delete ( string $key ) : void
$key string
리턴 void

destroy() 공개 메소드

Destroy/end a session
public destroy ( ) : void
리턴 void

expireSessionCookie() 공개 메소드

Sends a session cookie with no value, and with an expiry in the past.
public expireSessionCookie ( ) : void
리턴 void

get() 공개 메소드

Get value by key
public get ( string $key ) : mixed
$key string
리턴 mixed

getAdapter() 공개 메소드

Get SaveHandler Object
public getAdapter ( ) : SessionHandlerInterface
리턴 SessionHandlerInterface

getId() 공개 메소드

Proxies to {@link session_id()}
public getId ( ) : string
리턴 string

getName() 공개 메소드

Proxies to {@link session_name()}.
public getName ( ) : string
리턴 string

getNamespace() 공개 메소드

Get Namespace
public getNamespace ( ) : string
리턴 string

initAdapter() 보호된 메소드

Since ext/session is coupled to this particular session manager register the save handler with ext/session.
protected initAdapter ( ) : boolean
리턴 boolean

regenerateId() 공개 메소드

Regenerate the session ID, using session save handler's native ID generation Can safely be called in the middle of a session.
public regenerateId ( boolean $deleteOldSession = true ) : boolean
$deleteOldSession boolean
리턴 boolean

sessionExists() 공개 메소드

Does a session started and is it currently active?
public sessionExists ( ) : boolean
리턴 boolean

set() 공개 메소드

Set key/value pair
public set ( string $key, mixed $value ) : void
$key string
$value mixed
리턴 void

setAdapter() 공개 메소드

Set session save handler object
public setAdapter ( SessionHandlerInterface $saveHandler ) : Session
$saveHandler SessionHandlerInterface
리턴 Session

setId() 공개 메소드

Can safely be called in the middle of a session.
public setId ( string $id ) : Session
$id string
리턴 Session

setName() 공개 메소드

If the session has already been started, or if the name provided fails validation, an exception will be raised.
public setName ( string $name ) : Session
$name string
리턴 Session

setNamespace() 공개 메소드

Set Namespace
public setNamespace ( string $namespace ) : Session
$namespace string
리턴 Session

setSavePath() 보호된 메소드

Set session save path
protected setSavePath ( string $savePath ) : Session
$savePath string
리턴 Session

setSessionCookieLifetime() 공개 메소드

If a session already exists, destroys it (without sending an expiration cookie), regenerates the session ID, and restarts the session.
public setSessionCookieLifetime ( integer $ttl ) : void
$ttl integer TTL in seconds
리턴 void

start() 공개 메소드

if No session currently exists, attempt to start it. Calls {@link isValid()} once session_start() is called, and raises an exception if validation fails.
public start ( ) : void
리턴 void

프로퍼티 상세

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

Session save handler
protected $adapter

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

value returned by session_name()
protected $name

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

namespace
protected $namespace