PHP 클래스 Nette\Http\Session

상속: use trait Nette\SmartObject
파일 보기 프로젝트 열기: nette/http 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Nette\Http\IRequest $request, Nette\Http\IResponse $response )
clean ( ) : void Cleans and minimizes meta structures. This method is called automatically on shutdown, do not call it directly.
close ( ) : void Ends the current session and store session data.
destroy ( ) : void Destroys all data registered to a session.
exists ( ) : boolean Does session exists for the current request?
getCookieParameters ( ) : array Returns the session cookie parameters.
getId ( ) : string Returns the current session ID. Don't make dependencies, can be changed for each request.
getIterator ( ) : ArrayIterator Iteration over all sections.
getName ( ) : string Gets the session name.
getOptions ( ) : array Returns all session options.
getSection ( $section, $class = SessionSection::class ) : SessionSection Returns specified session section.
hasSection ( $section ) : boolean Checks if a session section exist and is not empty.
isStarted ( ) : boolean Has been session started?
regenerateId ( ) : void Regenerates the session ID.
setCookieParameters ( $path, $domain = NULL, $secure = NULL ) : self Sets the session cookie parameters.
setExpiration ( $time ) : self Sets the amount of time allowed between requests before the session will be terminated.
setHandler ( SessionHandlerInterface $handler ) : self Sets user session handler.
setName ( $name ) : self Sets the session name to a specified one.
setOptions ( array $options ) : self Sets session options.
setSavePath ( $path ) : self Sets path of the directory used to save session data.
setStorage ( Nette\Http\ISessionStorage $storage ) : self
start ( ) : void Starts and initializes session data.

비공개 메소드들

메소드 설명
configure ( array $config ) : void Configures session environment.
sendCookie ( ) : void Sends the session cookies.

메소드 상세

__construct() 공개 메소드

public __construct ( Nette\Http\IRequest $request, Nette\Http\IResponse $response )
$request Nette\Http\IRequest
$response Nette\Http\IResponse

clean() 공개 메소드

Cleans and minimizes meta structures. This method is called automatically on shutdown, do not call it directly.
public clean ( ) : void
리턴 void

close() 공개 메소드

Ends the current session and store session data.
public close ( ) : void
리턴 void

destroy() 공개 메소드

Destroys all data registered to a session.
public destroy ( ) : void
리턴 void

exists() 공개 메소드

Does session exists for the current request?
public exists ( ) : boolean
리턴 boolean

getCookieParameters() 공개 메소드

Returns the session cookie parameters.
public getCookieParameters ( ) : array
리턴 array containing items: lifetime, path, domain, secure, httponly

getId() 공개 메소드

Returns the current session ID. Don't make dependencies, can be changed for each request.
public getId ( ) : string
리턴 string

getIterator() 공개 메소드

Iteration over all sections.

getName() 공개 메소드

Gets the session name.
public getName ( ) : string
리턴 string

getOptions() 공개 메소드

Returns all session options.
public getOptions ( ) : array
리턴 array

getSection() 공개 메소드

Returns specified session section.
public getSection ( $section, $class = SessionSection::class ) : SessionSection
리턴 SessionSection

hasSection() 공개 메소드

Checks if a session section exist and is not empty.
public hasSection ( $section ) : boolean
리턴 boolean

isStarted() 공개 메소드

Has been session started?
public isStarted ( ) : boolean
리턴 boolean

regenerateId() 공개 메소드

Regenerates the session ID.
public regenerateId ( ) : void
리턴 void

setCookieParameters() 공개 메소드

Sets the session cookie parameters.
public setCookieParameters ( $path, $domain = NULL, $secure = NULL ) : self
리턴 self

setExpiration() 공개 메소드

Sets the amount of time allowed between requests before the session will be terminated.
public setExpiration ( $time ) : self
리턴 self

setHandler() 공개 메소드

Sets user session handler.
public setHandler ( SessionHandlerInterface $handler ) : self
$handler SessionHandlerInterface
리턴 self

setName() 공개 메소드

Sets the session name to a specified one.
public setName ( $name ) : self
리턴 self

setOptions() 공개 메소드

Sets session options.
public setOptions ( array $options ) : self
$options array
리턴 self

setSavePath() 공개 메소드

Sets path of the directory used to save session data.
public setSavePath ( $path ) : self
리턴 self

setStorage() 공개 메소드

사용 중단: use setHandler().
public setStorage ( Nette\Http\ISessionStorage $storage ) : self
$storage Nette\Http\ISessionStorage
리턴 self

start() 공개 메소드

Starts and initializes session data.
public start ( ) : void
리턴 void