lithium\storage\session\adapter\Cookie::__construct()
Constructor.
Takes care of setting appropriate configurations for this object.
Parameters
-
array
$config
Configuration for this adapter. These settings are queryable through
Session::config('name')
. The available options are as follows:'expire'
string: Defaults to'+2 days'
.'path'
string: Defaults to'/'
and does not further restrict path access.'domain'
string: Defaults to''
and does not further restrict domain access.'secure'
boolean: Defaults tofalse
.'httponly'
boolean: Defaults tofalse
.'name'
string: Defaults to the basename of the applications path.
Returns
voidSource
public function __construct(array $config = []) {
if (empty($config['name'])) {
$config['name'] = basename(Libraries::get(true, 'path')) . 'cookie';
}
$this->_autoConfig($config + $this->_defaults, []);
$this->_autoInit($config);
}