Fat-Free Framework
3.2.1
|
SQL-managed session handler. More...
Public Member Functions | |
open ($path, $name) | |
close () | |
read ($id) | |
write ($id, $data) | |
destroy ($id) | |
cleanup ($max) | |
csrf ($id=NULL) | |
ip ($id=NULL) | |
stamp ($id=NULL) | |
agent ($id=NULL) | |
__construct (\DB\SQL $db, $table='sessions') | |
![]() | |
exists ($key) | |
set ($key, $val) | |
get ($key) | |
clear ($key) | |
type ($pdo) | |
value ($type, $val) | |
cast ($obj=NULL) | |
select ($fields, $filter=NULL, array $options=NULL, $ttl=0) | |
find ($filter=NULL, array $options=NULL, $ttl=0) | |
count ($filter=NULL, $ttl=0) | |
skip ($ofs=1) | |
insert () | |
update () | |
erase ($filter=NULL) | |
reset () | |
copyfrom ($key, $func=NULL) | |
copyto ($key) | |
schema () | |
fields ($adhoc=TRUE) | |
__construct (\DB\SQL $db, $table, $fields=NULL, $ttl=60) | |
![]() | |
cast ($obj=NULL) | |
find ($filter=NULL, array $options=NULL, $ttl=0) | |
count ($filter=NULL, $ttl=0) | |
insert () | |
update () | |
copyfrom ($key, $func=NULL) | |
copyto ($key) | |
dry () | |
findone ($filter=NULL, array $options=NULL, $ttl=0) | |
paginate ($pos=0, $size=10, $filter=NULL, array $options=NULL) | |
load ($filter=NULL, array $options=NULL, $ttl=0) | |
first () | |
last () | |
skip ($ofs=1) | |
next () | |
prev () | |
save () | |
erase () | |
onload ($func) | |
oninsert ($func) | |
onupdate ($func) | |
onerase ($func) | |
reset () | |
![]() | |
exists ($key) | |
set ($key, $val) | |
get ($key) | |
clear ($key) | |
offsetexists ($key) | |
__isset ($key) | |
offsetset ($key, $val) | |
__set ($key, $val) | |
offsetget ($key) | |
__get ($key) | |
offsetunset ($key) | |
__unset ($key) | |
Additional Inherited Members | |
![]() | |
$engine | |
Database engine. | |
$source | |
SQL table. | |
$table | |
SQL table (quoted) | |
$_id | |
Last insert ID. | |
$fields | |
Defined fields. | |
$adhoc =array() | |
Adhoc fields. | |
const | E_Adhoc ='Unable to process ad hoc field %s' |
![]() | |
$ptr =0 | |
Current position. | |
$trigger =array() | |
Event listeners. | |
const | E_Field ='Undefined field %s' |
![]() | |
factory ($row) | |
![]() | |
$db | |
PDO wrapper. | |
![]() | |
$query =array() | |
Query results. | |
SQL-managed session handler.
DB\SQL\Session::__construct | ( | \DB\SQL | $db, |
$table = 'sessions' |
|||
) |
Instantiate class
$db | object |
$table | string |
DB\SQL\Session::agent | ( | $id = NULL | ) |
Return HTTP user agent associated with specified session ID
$id | string |
DB\SQL\Session::cleanup | ( | $max | ) |
Garbage collector
$max | int |
DB\SQL\Session::close | ( | ) |
Close session
DB\SQL\Session::csrf | ( | $id = NULL | ) |
Return anti-CSRF tokan associated with specified session ID
$id | string |
DB\SQL\Session::destroy | ( | $id | ) |
Destroy session
$id | string |
DB\SQL\Session::ip | ( | $id = NULL | ) |
Return IP address associated with specified session ID
$id | string |
DB\SQL\Session::open | ( | $path, | |
$name | |||
) |
Open session
$path | string |
$name | string |
DB\SQL\Session::read | ( | $id | ) |
Return session data in serialized format
$id | string |
DB\SQL\Session::stamp | ( | $id = NULL | ) |
Return Unix timestamp associated with specified session ID
$id | string |
DB\SQL\Session::write | ( | $id, | |
$data | |||
) |
Write session data
$id | string |
$data | string |