__construct() public method

Constructor for the Cookie class intialises all class variables with the given parameters. Most of the parameters map to PHP's setcookie function. It creates a new Session object via the $this->__init()
public __construct ( string $index, integer $timeout, string $path = '/', string $domain = null, boolean $httpOnly = true )
$index string The prefix to used to namespace all Symphony cookies
$timeout integer The Time to Live for a cookie, by default this is zero, meaning the cookie never expires
$path string The path the cookie is valid for on the domain
$domain string The domain this cookie is valid for
$httpOnly boolean Whether this cookie can be read by Javascript. By default the cookie cannot be read by Javascript
Ejemplo n.º 1
0
 function __construct($path = NULL)
 {
     parent::__construct($path);
 }
Ejemplo n.º 2
0
 function __construct($path = null)
 {
     parent::__construct($path);
 }
Ejemplo n.º 3
0
 public function __construct($userid, $lastLoginTime)
 {
     $this->UserID = $userid;
     $this->LastLogin = $lastLoginTime;
     parent::__construct(CookieKeys::PERSIST_LOGIN, sprintf('%s|%s', $userid, $lastLoginTime));
 }