PHP Интерфейс Neos\Flow\Session\SessionInterface

Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
addTag ( string $tag ) : void Tags this session with the given tag.
canBeResumed ( ) : boolean Returns TRUE if there is a session that can be resumed. FALSE otherwise
close ( ) : void Explicitly writes (persists) and closes the session
collectGarbage ( ) : integer Remove data of all sessions which are considered to be expired.
destroy ( string $reason = null ) : void Explicitly destroys all session data
getData ( string $key ) : array Returns the contents (array) associated with the given key.
getId ( ) : string Returns the current session ID.
getLastActivityTimestamp ( ) : integer Returns the unix time stamp marking the last point in time this session has been in use.
getTags ( ) : array Returns the tags this session has been tagged with.
hasKey ( string $key ) : boolean Returns TRUE if $key is available.
isStarted ( ) : boolean Tells if the session has been started already.
putData ( string $key, mixed $data ) : void Stores the given data under the given key in the session
removeTag ( string $tag ) : void Removes the specified tag from this session.
renewId ( ) : string Generates and propagates a new session ID and transfers all existing data to the new session.
resume ( ) : void Resumes an existing session, if any.
start ( ) : void Starts the session, if is has not been already started
touch ( ) : void Updates the last activity time to "now".

Описание методов

addTag() публичный метод

Note that third-party libraries might also tag your session. Therefore it is recommended to use namespaced tags such as "Acme-Demo-MySpecialTag".
public addTag ( string $tag ) : void
$tag string The tag – must match be a valid cache frontend tag
Результат void

canBeResumed() публичный метод

Returns TRUE if there is a session that can be resumed. FALSE otherwise
public canBeResumed ( ) : boolean
Результат boolean

close() публичный метод

Explicitly writes (persists) and closes the session
public close ( ) : void
Результат void

collectGarbage() публичный метод

Remove data of all sessions which are considered to be expired.
public collectGarbage ( ) : integer
Результат integer The number of outdated entries removed or NULL if no such information could be determined

destroy() публичный метод

Explicitly destroys all session data
public destroy ( string $reason = null ) : void
$reason string A reason for destroying the session – used by the LoggingAspect
Результат void

getData() публичный метод

Returns the contents (array) associated with the given key.
public getData ( string $key ) : array
$key string An identifier for the content stored in the session.
Результат array The contents associated with the given key

getId() публичный метод

Returns the current session ID.
public getId ( ) : string
Результат string The current session ID

getLastActivityTimestamp() публичный метод

For the current (local) session, this method will always return the current time. For a remote session, the unix timestamp will be returned.
public getLastActivityTimestamp ( ) : integer
Результат integer unix timestamp

getTags() публичный метод

Returns the tags this session has been tagged with.
public getTags ( ) : array
Результат array The tags or an empty array if there aren't any

hasKey() публичный метод

Returns TRUE if $key is available.
public hasKey ( string $key ) : boolean
$key string
Результат boolean

isStarted() публичный метод

Tells if the session has been started already.
public isStarted ( ) : boolean
Результат boolean

putData() публичный метод

Stores the given data under the given key in the session
public putData ( string $key, mixed $data ) : void
$key string The key under which the data should be stored
$data mixed The data to be stored
Результат void

removeTag() публичный метод

Removes the specified tag from this session.
public removeTag ( string $tag ) : void
$tag string The tag – must match be a valid cache frontend tag
Результат void

renewId() публичный метод

Renewing the session ID is one counter measure against Session Fixation Attacks.
public renewId ( ) : string
Результат string The new session ID

resume() публичный метод

Resumes an existing session, if any.
public resume ( ) : void
Результат void

start() публичный метод

Starts the session, if is has not been already started
public start ( ) : void
Результат void

touch() публичный метод

Updates the last activity time to "now".
public touch ( ) : void
Результат void