PHP Class Prado\Web\THttpCookie

A THttpCookie instance stores a single cookie, including the cookie name, value, domain, path, expire, and secure.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends Prado\TComponent
Show file Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
__construct ( $name, $value ) Constructor.
getDomain ( ) : string
getExpire ( ) : integer
getHttpOnly ( ) : boolean
getName ( ) : string
getPath ( ) : string
getSecure ( ) : boolean
getValue ( ) : string
setDomain ( $value )
setExpire ( $value )
setHttpOnly ( boolean $value )
setName ( $value )
setPath ( $value )
setSecure ( $value )
setValue ( $value )

Method Details

__construct() public method

Constructor.
public __construct ( $name, $value )

getDomain() public method

public getDomain ( ) : string
return string the domain to associate the cookie with

getExpire() public method

public getExpire ( ) : integer
return integer the time the cookie expires. This is a Unix timestamp so is in number of seconds since the epoch.

getHttpOnly() public method

public getHttpOnly ( ) : boolean
return boolean if true the cookie value will be unavailable to JavaScript

getName() public method

public getName ( ) : string
return string the name of the cookie

getPath() public method

public getPath ( ) : string
return string the path on the server in which the cookie will be available on, default is '/'

getSecure() public method

public getSecure ( ) : boolean
return boolean whether the cookie should only be transmitted over a secure HTTPS connection

getValue() public method

public getValue ( ) : string
return string the value of the cookie

setDomain() public method

public setDomain ( $value )

setExpire() public method

public setExpire ( $value )

setHttpOnly() public method

public setHttpOnly ( boolean $value )
$value boolean if true the cookie value will be unavailable to JavaScript

setName() public method

public setName ( $value )

setPath() public method

public setPath ( $value )

setSecure() public method

public setSecure ( $value )

setValue() public method

public setValue ( $value )