PHP Класс s, kirby

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

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

Метод Описание
destroy ( ) Destroys a session
get ( mixed $key = false, mixed $default = null ) : mixed Gets a session value by key
id ( ) : string Returns the current session id
remove ( mixed $key ) : array Removes a value from the session by key
restart ( ) Destroys a session first and then starts it again
set ( mixed $key, mixed $value = false ) Sets a session value by key
start ( ) Starts a new session

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

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

Destroys a session
static public destroy ( )

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

Gets a session value by key
static public get ( mixed $key = false, mixed $default = null ) : mixed
$key mixed The key to look for. Pass false or null to return the entire session array.
$default mixed Optional default value, which should be returned if no element has been found
Результат mixed

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

Returns the current session id
static public id ( ) : string
Результат string

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

Removes a value from the session by key
static public remove ( mixed $key ) : array
$key mixed The key to remove by
Результат array The session array without the value

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

Destroys a session first and then starts it again
static public restart ( )

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

Sets a session value by key
static public set ( mixed $key, mixed $value = false )
$key mixed The key to define
$value mixed The value for the passed key

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

Starts a new session
static public start ( )