PHP Class Pimcore\Tool\Session

Afficher le fichier Open project: pimcore/pimcore Class Usage Examples

Protected Properties

Свойство Type Description
$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

Méthodes publiques

Méthode Description
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 ( )

Méthodes protégées

Méthode Description
backupForeignSession ( ) : boolean
restoreForeignSession ( ) : boolean

Method Details

backupForeignSession() protected static méthode

protected static backupForeignSession ( ) : boolean
Résultat boolean

get() public static méthode

public static get ( string $namespace = "pimcore_admin", boolean $readOnly = false ) : Zend_Session_Namespace
$namespace string
$readOnly boolean
Résultat Zend_Session_Namespace

getOption() public static méthode

public static getOption ( $name ) : mixed
$name
Résultat mixed

getReadOnly() public static méthode

public static getReadOnly ( string $namespace = "pimcore_admin" ) : stdClass
$namespace string
Résultat stdClass

isSessionCookieCleanupNeeded() public static méthode

public static isSessionCookieCleanupNeeded ( ) : boolean
Résultat boolean

regenerateId() public static méthode

public static regenerateId ( )

restoreForeignSession() protected static méthode

protected static restoreForeignSession ( ) : boolean
Résultat boolean

setOption() public static méthode

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

useSession() public static méthode

public static useSession ( $func, string $namespace = "pimcore_admin" ) : mixed
$func
$namespace string
Résultat mixed

writeClose() public static méthode

public static writeClose ( )

Property Details

$openedSessions protected_oe static_oe property

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_oe static_oe property

protected static array $options
Résultat array

$restoreSession protected_oe static_oe property

protected static array $restoreSession
Résultat array

$sessionCookieCleanupNeeded protected_oe static_oe property

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
Résultat boolean

$sessions protected_oe static_oe property

contains the session namespace objects
protected static array $sessions
Résultat array