web\DbSession writeSession()

writeSession() public method Session write handler. Do not call this method directly. public boolean writeSession ( $id, $data )$id string Session ID $data string Session data return boolean Whether session write is successful

web\DbSession regenerateID()

regenerateID() public method Updates the current session ID with a newly generated one . Please refer to http://php.net/session_regenerate_id for more details. public void regenerateID ( $deleteOldSession = false )$deleteOldSession boolean Whether to delete the old associated session file or not.

web\DbSession readSession()

readSession() public method Session read handler. Do not call this method directly. public string readSession ( $id )$id string Session ID return string The session data

web\DbSession init()

init() public method Initializes the DbSession component. This method will initialize the $db property to make sure it refers to a valid DB connection. public void init ( )throws yii\base\InvalidConfigException if $db is invalid.

web\DbSession gcSession()

gcSession() public method Session GC (garbage collection) handler. Do not call this method directly. public boolean gcSession ( $maxLifetime )$maxLifetime integer The number of seconds after which data will be seen as 'garbage' and cleaned up. return boolean Whether session is GCed successfully

web\DbSession destroySession()

destroySession() public method Session destroy handler. Do not call this method directly. public boolean destroySession ( $id )$id string Session ID return boolean Whether session is destroyed successfully

web\DbSession $sessionTable

$sessionTable public property The name of the DB table that stores the session data. The table should be pre-created as follows: CREATE TABLE session ( id CHAR(40) NOT NULL PRIMARY KEY, expire INTEGER, data BLOB ) where 'BLOB' refers to the BLOB-type of your preferred DBMS. Below are the BLOB type that can be used for some popular DBMS: MySQL: LONGBLOB PostgreSQL: BYTEA MSSQL: BLOB When using DbSession in a production server, we recommend you create a DB index for the 'expire'

web\DbSession $db

$db public property The DB connection object or the application component ID of the DB connection. After the DbSession object is created, if you want to change this property, you should only assign it with a DB connection object. Starting from version 2.0.2, this can also be a configuration array for creating the object. public yii\db\Connection|array|string $db = 'db'

web\CookieCollection __construct()

__construct() public method Constructor. public void __construct ( $cookies = [], $config = [] )$cookies array The cookies that this collection initially contains. This should be an array of name-value pairs. $config array Name-value pairs that will be used to initialize the object properties

web\CookieCollection toArray()

toArray() public method Returns the collection as a PHP array. public array toArray ( )return array The array representation of the collection. The array keys are cookie names, and the array values are the corresponding cookie objects.