Fat-Free Framework: DB\SQL\Session Class Reference

Fat-Free-Framework

Fat-Free Framework  3.1.0 API Reference
DB\SQL\Session Class Reference

SQL-managed session handler. More...

Inheritance diagram for DB\SQL\Session:
DB\SQL\Mapper DB\Cursor Magic

Public Member Functions

 open ($path, $name)
 
 close ()
 
 read ($id)
 
 write ($id, $data)
 
 destroy ($id)
 
 cleanup ($max)
 
 ip ($id=NULL)
 
 stamp ($id=NULL)
 
 agent ($id=NULL)
 
 __construct (\DB\SQL $db, $table='sessions')
 
- Public Member Functions inherited from DB\SQL\Mapper
 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)
 
 copyto ($key)
 
 schema ()
 
 __construct (\DB\SQL $db, $table, $ttl=60)
 
- Public Member Functions inherited from DB\Cursor
 find ($filter=NULL, array $options=NULL)
 
 insert ()
 
 update ()
 
 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)
 
 first ()
 
 last ()
 
 skip ($ofs=1)
 
 next ()
 
 prev ()
 
 save ()
 
 erase ()
 
 reset ()
 
- Public Member Functions inherited from Magic
 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

- Public Attributes inherited from DB\SQL\Mapper
 $engine
 Database engine.
 
 $table
 SQL table.
 
 $_id
 Last insert ID.
 
 $fields
 Defined fields.
 
 $adhoc =array()
 Adhoc fields.
 
const E_Adhoc ='Unable to process ad hoc field %s'
 
- Protected Member Functions inherited from DB\SQL\Mapper
 factory ($row)
 
- Protected Attributes inherited from DB\SQL\Mapper
 $db
 PDO wrapper.
 

Detailed Description

SQL-managed session handler.

Constructor & Destructor Documentation

DB\SQL\Session::__construct ( \DB\SQL  $db,
  $table = 'sessions' 
)

Instantiate class

Parameters
$dbobject
$tablestring

Member Function Documentation

DB\SQL\Session::agent (   $id = NULL)

Return HTTP user agent associated with specified session ID

Returns
string|FALSE
Parameters
$idstring
DB\SQL\Session::cleanup (   $max)

Garbage collector

Returns
TRUE
Parameters
$maxint
DB\SQL\Session::close ( )

Close session

Returns
TRUE
DB\SQL\Session::destroy (   $id)

Destroy session

Returns
TRUE
Parameters
$idstring
DB\SQL\Session::ip (   $id = NULL)

Return IP address associated with specified session ID

Returns
string|FALSE
Parameters
$idstring
DB\SQL\Session::open (   $path,
  $name 
)

Open session

Returns
TRUE
Parameters
$pathstring
$namestring
DB\SQL\Session::read (   $id)

Return session data in serialized format

Returns
string|FALSE
Parameters
$idstring
DB\SQL\Session::stamp (   $id = NULL)

Return Unix timestamp associated with specified session ID

Returns
string|FALSE
Parameters
$idstring
DB\SQL\Session::write (   $id,
  $data 
)

Write session data

Returns
TRUE
Parameters
$idstring
$datastring

The documentation for this class was generated from the following file:
  • db/sql/session.php
Generated on Mon Aug 19 2013 21:28:04 for Fat-Free Framework by   doxygen 1.8.4