User Tools

Site Tools


libraries:cookiehandler:cookiehandlerclass:construct

CookieHandler::__construct()


Definition

Instantiates a new instance of CookieHandler class.

void __construct ( $Name, [$Path = '', [$Domain = '']] )

Parameters

  • $Name String
    Mandatory name of the cookie to write/read.
  • $Path String (optional)
    Path of the website, the cookie is valid for.
  • $Domain String (optional)
    Domain/Subdomain for which the cookie is valid. If no domain is given, the current domain is used.

Exceptions

  • CookieHandlerException:EC_NONAME (101)
    No valid name given

Example

try
{
   $Cookie = new CookieHandler($_CONFIG['cookiename']);
}
catch (CookieHandlerException $e)
{
   die ("Error: " . $e->getMessage());
}
libraries/cookiehandler/cookiehandlerclass/construct.txt · Last modified: 2022/12/13 13:04 by michael.pohl