Свойство | Type | Description | |
---|---|---|---|
$_defaults | Default ini settings for this session adapter. Will disabl cookie lifetime, set cookies to HTTP only and the cache_limiter to 'nocache'. |
Méthode | Description | |
---|---|---|
__construct ( array $config = [] ) : void | Constructor. Takes care of setting appropriate configurations for this object. Also sets session ini settings. | |
check ( string $key, array $options = [] ) : Closure | Checks if a value has been set in the session. | |
clear ( array $options = [] ) : Closure | Clears all keys from the session. | |
delete ( string $key, array $options = [] ) : Closure | Delete value from the session | |
enabled ( ) : boolean | Determines if PHP sessions are enabled. | |
isStarted ( ) : boolean | Obtain the status of the session. | |
key ( string $key = null ) : mixed | Sets or obtains the session ID. | |
overwrite ( array &$old, array $new ) : boolean | Overwrites session keys and values. | |
read ( null | string $key = null, array $options = [] ) : Closure | Read a value from the session. | |
write ( string $key, mixed $value, array $options = [] ) : Closure | Write a value to the session. |
Méthode | Description | |
---|---|---|
_init ( ) | Initialization of the session. | |
_start ( ) : boolean | Starts the session. |
public __construct ( array $config = [] ) : void | ||
$config | array | Configuration options matching the pattern `'session.*'` are interpreted as session ini settings. Please consult the PHP documentation for further information. A few ini settings are set by default here and will overwrite those from your php.ini. To disable sending a cache limiter set `'session.cache_limiter'` to `false`. |
Résultat | void |
public read ( null | string $key = null, array $options = [] ) : Closure | ||
$key | null | string | Key of the entry to be read. If no key is passed, all current session data is returned. |
$options | array | Options array. Not used for this adapter method. |
Résultat | Closure | Function returning data in the session if successful, `false` otherwise. |
public write ( string $key, mixed $value, array $options = [] ) : Closure | ||
$key | string | Key of the item to be stored. |
$value | mixed | The value to be stored. |
$options | array | Options array. Not used for this adapter method. |
Résultat | Closure | Function returning boolean `true` on successful write, `false` otherwise. |