| 
    Elgg
    Version 1.10
    
   | 
 
  
Public Member Functions | |||||||||
| __construct (array $options=array(), \Elgg\Http\SessionHandler $handler=null) | |||||||||
| Constructor.  More... | |||||||||
| start () | |||||||||
{Starts the session.
 
  | |||||||||
| regenerate ($destroy=false, $lifetime=null) | |||||||||
{Regenerates id that represents this storage.This method must invoke session_regenerate_id($destroy) unless this interface is used for a storage object designed for unit or functional testing where a real PHP session would interfere with testing.Note regenerate+destroy should not clear the session data in memory only delete the session data from persistent storage.
 
 
  | |||||||||
| save () | |||||||||
{Force the session to be saved and closed.This method must invoke session_write_close() unless this interface is used for a storage object design for unit or functional testing where a real PHP session would interfere with testing, in which case it it should actually persist the session data if required.
 
  | |||||||||
| isStarted () | |||||||||
{Checks if the session is started.
  | |||||||||
| getId () | |||||||||
{Returns the session ID.
  | |||||||||
| setId ($id) | |||||||||
{Sets the session ID.
 
  | |||||||||
| getName () | |||||||||
{Returns the session name.
  | |||||||||
| setName ($name) | |||||||||
{Sets the session name.
 
  | |||||||||
| has ($name) | |||||||||
{Checks if an attribute is defined.
 
  | |||||||||
| get ($name, $default=null) | |||||||||
{Returns an attribute.
 
  | |||||||||
| set ($name, $value) | |||||||||
{Sets an attribute.
 
  | |||||||||
| all () | |||||||||
{Returns all attributes.
  | |||||||||
| replace (array $attributes) | |||||||||
{Replaces all attributes.
 
  | |||||||||
| remove ($name) | |||||||||
{Removes an attribute.
 
  | |||||||||
| clear () | |||||||||
{Clears all attributes.
  | |||||||||
Protected Member Functions | |
| setOptions (array $options) | |
| Sets session.  More... | |
| setHandler ($handler) | |
| Set the session handler class with PHP.  More... | |
Protected Attributes | |
| $started = false | |
| $closed = false | |
Definition at line 36 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::__construct | ( | array | $options = array(),  | 
        
| \Elgg\Http\SessionHandler | $handler = null  | 
        ||
| ) | 
Constructor.
List of options for $options array with their defaults.
("auto_start", is not supported as it tells PHP to start a session before PHP starts to execute user-land code. Setting during runtime has no effect).
cache_limiter, "nocache" (use "0" to prevent headers from being sent entirely). cookie_domain, "" cookie_httponly, "" cookie_lifetime, "0" cookie_path, "/" cookie_secure, "" entropy_file, "" entropy_length, "0" gc_divisor, "100" gc_maxlifetime, "1440" gc_probability, "1" hash_bits_per_character, "4" hash_function, "0" referer_check, "" serialize_handler, "php" use_cookies, "1" use_only_cookies, "1" use_trans_sid, "0" upload_progress.enabled, "1" upload_progress.cleanup, "1" upload_progress.prefix, "upload_progress_" upload_progress.name, "PHP_SESSION_UPLOAD_PROGRESS" upload_progress.freq, "1%" upload_progress.min-freq, "1"
| array | $options | Session config options | 
| \Elgg\Http\SessionHandler | $handler | Session handler | 
Definition at line 82 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::all | ( | ) | 
{Returns all attributes.
Implements Elgg\Http\SessionStorage.
Definition at line 202 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::clear | ( | ) | 
{Clears all attributes.
Implements Elgg\Http\SessionStorage.
Definition at line 241 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::get | ( | $name, | |
$default = null  | 
        |||
| ) | 
{Returns an attribute.
| string | $name | The attribute name | 
| mixed | $default | The default value if not found. | 
Implements Elgg\Http\SessionStorage.
Definition at line 182 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::getId | ( | ) | 
{Returns the session ID.
Implements Elgg\Http\SessionStorage.
Definition at line 135 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::getName | ( | ) | 
{Returns the session name.
Implements Elgg\Http\SessionStorage.
Definition at line 157 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::has | ( | $name | ) | 
{Checks if an attribute is defined.
| string | $name | The attribute name | 
Implements Elgg\Http\SessionStorage.
Definition at line 171 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::isStarted | ( | ) | 
{Checks if the session is started.
Implements Elgg\Http\SessionStorage.
Definition at line 128 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::regenerate | ( | $destroy = false,  | 
        |
$lifetime = null  | 
        |||
| ) | 
{Regenerates id that represents this storage.This method must invoke session_regenerate_id($destroy) unless this interface is used for a storage object designed for unit or functional testing where a real PHP session would interfere with testing.Note regenerate+destroy should not clear the session data in memory only delete the session data from persistent storage.
| boolean | $destroy | Destroy session when regenerating? | 
| integer | $lifetime | Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp. | 
Implements Elgg\Http\SessionStorage.
Definition at line 108 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::remove | ( | $name | ) | 
{Removes an attribute.
| string | $name | Attribute name | 
Implements Elgg\Http\SessionStorage.
Definition at line 225 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::replace | ( | array | $attributes | ) | 
{Replaces all attributes.
| array | $attributes | Attributes | 
Implements Elgg\Http\SessionStorage.
Definition at line 212 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::save | ( | ) | 
{Force the session to be saved and closed.This method must invoke session_write_close() unless this interface is used for a storage object design for unit or functional testing where a real PHP session would interfere with testing, in which case it it should actually persist the session data if required.
Implements Elgg\Http\SessionStorage.
Definition at line 119 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::set | ( | $name, | |
| $value | |||
| ) | 
{Sets an attribute.
| string | $name | Attribute name | 
| mixed | $value | Attribute value | 
Implements Elgg\Http\SessionStorage.
Definition at line 192 of file NativeSessionStorage.php.
      
  | 
  protected | 
Set the session handler class with PHP.
| \Elgg\Http\SessionHandler | $handler | Handler object | 
Definition at line 284 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::setId | ( | $id | ) | 
{Sets the session ID.
| string | $id | Session string | 
Implements Elgg\Http\SessionStorage.
Definition at line 146 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::setName | ( | $name | ) | 
{Sets the session name.
| string | $name | Session name. | 
Implements Elgg\Http\SessionStorage.
Definition at line 164 of file NativeSessionStorage.php.
      
  | 
  protected | 
Sets session.
For convenience we omit 'session.' from the beginning of the keys. Explicitly ignores other ini keys.
| array | $options | Session ini directives array(key => value). | 
Definition at line 258 of file NativeSessionStorage.php.
| Elgg\Http\NativeSessionStorage::start | ( | ) | 
{Starts the session.
Implements Elgg\Http\SessionStorage.
Definition at line 90 of file NativeSessionStorage.php.
      
  | 
  protected | 
Definition at line 42 of file NativeSessionStorage.php.
      
  | 
  protected | 
Definition at line 39 of file NativeSessionStorage.php.