lithium\storage\session\adapter\Cookie::__construct()

public method

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 to false.
    • 'httponly' boolean: Defaults to false.
    • 'name' string: Defaults to the basename of the applications path.

Returns

void

Source

	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);
	}