PHP Класс Pimcore\Tool\Session

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

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

Свойство Тип Описание
$openedSessions contains how many sessions are currently open, this is important, because writeClose() must not be called if there is still an open session, this is especially important if something doesn't use the method use() but get() so the session isn't closed automatically after the action is done
$options array
$restoreSession array
$sessionCookieCleanupNeeded boolean when using mod_php, session_start() always adds an Set-Cookie header when called, this is the case in self::get(), so depending on how often self::get() is called the more header will get added to the response, so we clean them up in Pimcore::outputBufferEnd() to avoid problems with (reverse-)proxies such as Varnish who do not like too much Set-Cookie headers
$sessions array contains the session namespace objects

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

Метод Описание
get ( string $namespace = "pimcore_admin", boolean $readOnly = false ) : Zend_Session_Namespace
getOption ( $name ) : mixed
getReadOnly ( string $namespace = "pimcore_admin" ) : stdClass
isSessionCookieCleanupNeeded ( ) : boolean
regenerateId ( )
setOption ( $name, $value )
useSession ( $func, string $namespace = "pimcore_admin" ) : mixed
writeClose ( )

Защищенные методы

Метод Описание
backupForeignSession ( ) : boolean
restoreForeignSession ( ) : boolean

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

backupForeignSession() защищенный статический Метод

protected static backupForeignSession ( ) : boolean
Результат boolean

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

public static get ( string $namespace = "pimcore_admin", boolean $readOnly = false ) : Zend_Session_Namespace
$namespace string
$readOnly boolean
Результат Zend_Session_Namespace

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

public static getOption ( $name ) : mixed
$name
Результат mixed

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

public static getReadOnly ( string $namespace = "pimcore_admin" ) : stdClass
$namespace string
Результат stdClass

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

public static isSessionCookieCleanupNeeded ( ) : boolean
Результат boolean

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

public static regenerateId ( )

restoreForeignSession() защищенный статический Метод

protected static restoreForeignSession ( ) : boolean
Результат boolean

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

public static setOption ( $name, $value )
$name
$value

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

public static useSession ( $func, string $namespace = "pimcore_admin" ) : mixed
$func
$namespace string
Результат mixed

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

public static writeClose ( )

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

$openedSessions защищенное статическое свойство

contains how many sessions are currently open, this is important, because writeClose() must not be called if there is still an open session, this is especially important if something doesn't use the method use() but get() so the session isn't closed automatically after the action is done
protected static $openedSessions

$options защищенное статическое свойство

protected static array $options
Результат array

$restoreSession защищенное статическое свойство

protected static array $restoreSession
Результат array

$sessionCookieCleanupNeeded защищенное статическое свойство

when using mod_php, session_start() always adds an Set-Cookie header when called, this is the case in self::get(), so depending on how often self::get() is called the more header will get added to the response, so we clean them up in Pimcore::outputBufferEnd() to avoid problems with (reverse-)proxies such as Varnish who do not like too much Set-Cookie headers
protected static bool $sessionCookieCleanupNeeded
Результат boolean

$sessions защищенное статическое свойство

contains the session namespace objects
protected static array $sessions
Результат array