__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
コード例 #1
0
ファイル: PhantomJsCookie.php プロジェクト: bpteam/php-cookie
 function __construct($path = NULL)
 {
     parent::__construct($path);
 }
コード例 #2
0
ファイル: HtmlCookie.php プロジェクト: bpteam/php-cookie
 function __construct($path = null)
 {
     parent::__construct($path);
 }
コード例 #3
0
ファイル: LoginCookie.php プロジェクト: Trideon/gigolo
 public function __construct($userid, $lastLoginTime)
 {
     $this->UserID = $userid;
     $this->LastLogin = $lastLoginTime;
     parent::__construct(CookieKeys::PERSIST_LOGIN, sprintf('%s|%s', $userid, $lastLoginTime));
 }