public
boolean
|
#
SetCookie( string $name, string $value, integer $lifetime = 0, string $path = '/', string $domain = NULL, boolean $secure = NULL, boolean $httpOnly = TRUE )
Parameters
- $name
- Cookie name. Assuming the name is
cookiename , this value is retrieved through $_COOKIE['cookiename'] .
- $value
- The value of the cookie. This value is stored on the clients computer; do not store sensitive information.
- $lifetime
- Life time in seconds to expire. 0 means "until the browser is closed".
- $path
- The path on the server in which the cookie will be available on. If set to '/', the cookie will be available within the entire domain.
- $domain
- If not set, value is completed by
\MvcCore\Application::GetInstance()->GetRequest()->GetHostName(); .
- $secure
- If not set, value is completed by
\MvcCore\Application::GetInstance()->GetRequest()->IsSecure(); .
- $httpOnly
- HTTP only cookie,
TRUE by default.
Returns
boolean True if cookie has been set.
Throws
RuntimeException If HTTP headers have been sent.
Inheritdocs
|
public
boolean
|
#
DeleteCookie( string $name, string $path = '/', string $domain = NULL, boolean $secure = NULL )
Parameters
- $name
- Cookie name. Assuming the name is
cookiename , this value is retrieved through $_COOKIE['cookiename'] .
- $path
- The path on the server in which the cookie will be available on. If set to '/', the cookie will be available within the entire domain.
- $domain
- If not set, value is completed by
\MvcCore\Application::GetInstance()->GetRequest()->GetHostName(); .
- $secure
- If not set, value is completed by
\MvcCore\Application::GetInstance()->GetRequest()->IsSecure(); .
Returns
boolean True if cookie has been set.
Throws
RuntimeException If HTTP headers have been sent.
Inheritdocs
|