PHP Класс Neos\Flow\Session\TransientSession

This session behaves like any other session except that it only stores the data during one request.
Наследование: implements Neos\Flow\Session\SessionInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$data array The session data
$lastActivityTimestamp integer
$sessionId string The session Id
$started boolean If this session has been started
$tags array

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

Метод Описание
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 Closes the session
collectGarbage ( ) : void No operation for transient session.
destroy ( string $reason = null ) : void Explicitly destroys all session data
destroyAll ( Bootstrap $bootstrap ) : void No operation for transient session.
getData ( string $key ) : mixed Returns the data 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, object $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 it 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() публичный Метод

Closes the session
public close ( ) : void
Результат void

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

No operation for transient session.
public collectGarbage ( ) : void
Результат void

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

destroyAll() публичный статический Метод

No operation for transient session.
public static destroyAll ( Bootstrap $bootstrap ) : void
$bootstrap Neos\Flow\Core\Bootstrap
Результат void

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

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

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

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

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

Returns the unix time stamp marking the last point in time this session has been in use.
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, object $data ) : void
$key string The key under which the data should be stored
$data object 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() публичный Метод

Generates and propagates a new session ID and transfers all existing data to the new session.
public renewId ( ) : string
Результат string The new session ID

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

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

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

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

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

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

Описание свойств

$data защищенное свойство

The session data
protected array $data
Результат array

$lastActivityTimestamp защищенное свойство

protected int $lastActivityTimestamp
Результат integer

$sessionId защищенное свойство

The session Id
protected string $sessionId
Результат string

$started защищенное свойство

If this session has been started
protected bool $started
Результат boolean

$tags защищенное свойство

protected array $tags
Результат array