PHP Class CI_Session, TastyIgniter

Author: ExpressionEngine Dev Team
Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Méthodes publiques

Свойство Type Description
$userdata Just a reference to $_SESSION, for BC purposes.

Protected Properties

Свойство Type Description
$_config
$_driver

Méthodes publiques

Méthode Description
__construct ( array $params = [] ) : void Class constructor
__get ( string $key ) : mixed __get()
__isset ( string $key ) : boolean __isset()
__set ( string $key, mixed $value ) : void __set()
all_userdata ( ) : array All userdata (fetch)
flashdata ( string $key = NULL ) : mixed Flashdata (fetch)
get_flash_keys ( ) : array Get flash keys
get_temp_keys ( ) : array Get temp keys
get_userdata ( ) Get userdata reference
has_userdata ( string $key ) : boolean Has userdata
keep_flashdata ( mixed $key ) : void Keep flashdata
mark_as_flash ( mixed $key ) : boolean Mark as flash
mark_as_temp ( mixed $key, integer $ttl = 300 ) : boolean Mark as temp
sess_destroy ( ) : void Session destroy
sess_regenerate ( boolean $destroy = FALSE ) : void Session regenerate
set_flashdata ( mixed $data, mixed $value = NULL ) : void Set flashdata
set_tempdata ( mixed $data, mixed $value = NULL, integer $ttl = 300 ) : void Set tempdata
set_userdata ( mixed $data, mixed $value = NULL ) : void Set userdata
tempdata ( string $key = NULL ) : mixed Temp data (fetch)
unmark_flash ( mixed $key ) : void Unmark flash
unmark_temp ( mixed $key ) : void Unmark flash
unset_tempdata ( $key ) : void Unset tempdata
unset_userdata ( $key ) : void Unset userdata
userdata ( string $key = NULL ) : mixed Userdata (fetch)

Méthodes protégées

Méthode Description
_ci_init_vars ( ) : void Handle temporary variables
_ci_load_classes ( string $driver ) : string CI Load Classes
_configure ( &$params ) : void Configuration

Method Details

__construct() public méthode

Class constructor
public __construct ( array $params = [] ) : void
$params array Configuration parameters
Résultat void

__get() public méthode

__get()
public __get ( string $key ) : mixed
$key string 'session_id' or a session data key
Résultat mixed

__isset() public méthode

__isset()
public __isset ( string $key ) : boolean
$key string 'session_id' or a session data key
Résultat boolean

__set() public méthode

__set()
public __set ( string $key, mixed $value ) : void
$key string Session data key
$value mixed Session data value
Résultat void

_ci_init_vars() protected méthode

Clears old "flash" data, marks the new one for deletion and handles "temp" data deletion.
protected _ci_init_vars ( ) : void
Résultat void

_ci_load_classes() protected méthode

An internal method to load all possible dependency and extension classes. It kind of emulates the CI_Driver library, but is self-sufficient.
protected _ci_load_classes ( string $driver ) : string
$driver string Driver name
Résultat string Driver class name

_configure() protected méthode

Handle input parameters and configuration defaults
protected _configure ( &$params ) : void
Résultat void

all_userdata() public méthode

Legacy CI_Session compatibility method
public all_userdata ( ) : array
Résultat array $_SESSION, excluding flash data items

flashdata() public méthode

Legacy CI_Session compatibility method
public flashdata ( string $key = NULL ) : mixed
$key string Session data key
Résultat mixed Session data value or NULL if not found

get_flash_keys() public méthode

Get flash keys
public get_flash_keys ( ) : array
Résultat array

get_temp_keys() public méthode

Get temp keys
public get_temp_keys ( ) : array
Résultat array

get_userdata() public méthode

Legacy CI_Session compatibility method
public get_userdata ( )

has_userdata() public méthode

Legacy CI_Session compatibility method
public has_userdata ( string $key ) : boolean
$key string Session data key
Résultat boolean

keep_flashdata() public méthode

Legacy CI_Session compatibility method
public keep_flashdata ( mixed $key ) : void
$key mixed Session data key(s)
Résultat void

mark_as_flash() public méthode

Mark as flash
public mark_as_flash ( mixed $key ) : boolean
$key mixed Session data key(s)
Résultat boolean

mark_as_temp() public méthode

Mark as temp
public mark_as_temp ( mixed $key, integer $ttl = 300 ) : boolean
$key mixed Session data key(s)
$ttl integer Time-to-live in seconds
Résultat boolean

sess_destroy() public méthode

Legacy CI_Session compatibility method
public sess_destroy ( ) : void
Résultat void

sess_regenerate() public méthode

Legacy CI_Session compatibility method
public sess_regenerate ( boolean $destroy = FALSE ) : void
$destroy boolean Destroy old session data flag
Résultat void

set_flashdata() public méthode

Legacy CI_Session compatibility method
public set_flashdata ( mixed $data, mixed $value = NULL ) : void
$data mixed Session data key or an associative array
$value mixed Value to store
Résultat void

set_tempdata() public méthode

Legacy CI_Session compatibility method
public set_tempdata ( mixed $data, mixed $value = NULL, integer $ttl = 300 ) : void
$data mixed Session data key or an associative array of items
$value mixed Value to store
$ttl integer Time-to-live in seconds
Résultat void

set_userdata() public méthode

Legacy CI_Session compatibility method
public set_userdata ( mixed $data, mixed $value = NULL ) : void
$data mixed Session data key or an associative array
$value mixed Value to store
Résultat void

tempdata() public méthode

Legacy CI_Session compatibility method
public tempdata ( string $key = NULL ) : mixed
$key string Session data key
Résultat mixed Session data value or NULL if not found

unmark_flash() public méthode

Unmark flash
public unmark_flash ( mixed $key ) : void
$key mixed Session data key(s)
Résultat void

unmark_temp() public méthode

Unmark flash
public unmark_temp ( mixed $key ) : void
$key mixed Session data key(s)
Résultat void

unset_tempdata() public méthode

Legacy CI_Session compatibility method
public unset_tempdata ( $key ) : void
Résultat void

unset_userdata() public méthode

Legacy CI_Session compatibility method
public unset_userdata ( $key ) : void
Résultat void

userdata() public méthode

Legacy CI_Session compatibility method
public userdata ( string $key = NULL ) : mixed
$key string Session data key
Résultat mixed Session data value or NULL if not found

Property Details

$_config protected_oe property

protected $_config

$_driver protected_oe property

protected $_driver

$userdata public_oe property

Just a reference to $_SESSION, for BC purposes.
public $userdata