ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
Slim_Http_Cookie Class Reference
+ Collaboration diagram for Slim_Http_Cookie:

Public Member Functions

 __construct ($name, $value=null, $expires=0, $path=null, $domain=null, $secure=false, $httponly=false)
 Constructor.
 getName ()
 Get cookie name.
 setName ($name)
 Set cookie name.
 getValue ()
 Get cookie value.
 setValue ($value)
 Set cookie value.
 getExpires ()
 Get cookie expiration time.
 setExpires ($time)
 Set cookie expiration time.
 getPath ()
 Get cookie path.
 setPath ($path)
 Set cookie path.
 getDomain ()
 Get cookie domain.
 setDomain ($domain)
 Set cookie domain.
 getSecure ()
 Is cookie sent only if SSL/HTTPS is used?
 setSecure ($secure)
 Set whether cookie is sent only if SSL/HTTPS is used.
 getHttpOnly ()
 Is cookie sent with HTTP protocol only?
 setHttpOnly ($httponly)
 Set whether cookie is sent with HTTP protocol only.

Protected Attributes

 $name
 $value
 $expires
 $path
 $domain
 $secure
 $httponly

Detailed Description

Definition at line 42 of file Cookie.php.

Constructor & Destructor Documentation

Slim_Http_Cookie::__construct (   $name,
  $value = null,
  $expires = 0,
  $path = null,
  $domain = null,
  $secure = false,
  $httponly = false 
)

Constructor.

Parameters
string$nameThe cookie name
string$valueThe cookie value
mixed$timeThe duration of the cookie; If integer, should be a UNIX timestamp; If string, converted to UNIX timestamp with strtotime;
string$pathThe path on the server in which the cookie will be available on
string$domainThe domain that the cookie is available to
bool$secureIndicates that the cookie should only be transmitted over a secure HTTPS connection from the client
bool$httponlyWhen TRUE the cookie will be made accessible only through the HTTP protocol
Returns
void

Definition at line 93 of file Cookie.php.

References $domain, $expires, $httponly, $name, $path, $secure, $value, setDomain(), setExpires(), setHttpOnly(), setName(), setPath(), setSecure(), and setValue().

{
$this->setName($name);
$this->setValue($value);
$this->setPath($path);
$this->setDomain($domain);
$this->setSecure($secure);
}

+ Here is the call graph for this function:

Member Function Documentation

Slim_Http_Cookie::getDomain ( )

Get cookie domain.

Returns
string

Definition at line 175 of file Cookie.php.

References $domain.

{
return $this->domain;
}
Slim_Http_Cookie::getExpires ( )

Get cookie expiration time.

Returns
int UNIX timestamp

Definition at line 141 of file Cookie.php.

References $expires.

{
}
Slim_Http_Cookie::getHttpOnly ( )

Is cookie sent with HTTP protocol only?

Returns
bool

Definition at line 209 of file Cookie.php.

References $httponly.

{
}
Slim_Http_Cookie::getName ( )

Get cookie name.

Returns
string

Definition at line 107 of file Cookie.php.

References $name.

{
return $this->name;
}
Slim_Http_Cookie::getPath ( )

Get cookie path.

Returns
string

Definition at line 158 of file Cookie.php.

References $path.

{
return $this->path;
}
Slim_Http_Cookie::getSecure ( )

Is cookie sent only if SSL/HTTPS is used?

Returns
bool

Definition at line 192 of file Cookie.php.

References $secure.

{
return $this->secure;
}
Slim_Http_Cookie::getValue ( )

Get cookie value.

Returns
string

Definition at line 124 of file Cookie.php.

References $value.

{
return $this->value;
}
Slim_Http_Cookie::setDomain (   $domain)

Set cookie domain.

Parameters
string$domain
Returns
void

Definition at line 184 of file Cookie.php.

References $domain.

Referenced by __construct().

{
$this->domain = (string)$domain;
}

+ Here is the caller graph for this function:

Slim_Http_Cookie::setExpires (   $time)

Set cookie expiration time.

Parameters
string|intCookie expiration time
Returns
void

Definition at line 150 of file Cookie.php.

Referenced by __construct().

{
$this->expires = is_string($time) ? strtotime($time) : (int)$time;
}

+ Here is the caller graph for this function:

Slim_Http_Cookie::setHttpOnly (   $httponly)

Set whether cookie is sent with HTTP protocol only.

Parameters
bool$httponly
Returns
void

Definition at line 218 of file Cookie.php.

References $httponly.

Referenced by __construct().

{
$this->httponly = (bool)$httponly;
}

+ Here is the caller graph for this function:

Slim_Http_Cookie::setName (   $name)

Set cookie name.

Parameters
string$name
Returns
void

Definition at line 116 of file Cookie.php.

References $name.

Referenced by __construct().

{
$this->name = (string)$name;
}

+ Here is the caller graph for this function:

Slim_Http_Cookie::setPath (   $path)

Set cookie path.

Parameters
string$path
Returns
void

Definition at line 167 of file Cookie.php.

References $path.

Referenced by __construct().

{
$this->path = (string)$path;
}

+ Here is the caller graph for this function:

Slim_Http_Cookie::setSecure (   $secure)

Set whether cookie is sent only if SSL/HTTPS is used.

Parameters
bool$secure
Returns
void

Definition at line 201 of file Cookie.php.

References $secure.

Referenced by __construct().

{
$this->secure = (bool)$secure;
}

+ Here is the caller graph for this function:

Slim_Http_Cookie::setValue (   $value)

Set cookie value.

Parameters
string$value
Returns
void

Definition at line 133 of file Cookie.php.

References $value.

Referenced by __construct().

{
$this->value = (string)$value;
}

+ Here is the caller graph for this function:

Field Documentation

Slim_Http_Cookie::$domain
protected

Definition at line 67 of file Cookie.php.

Referenced by __construct(), getDomain(), and setDomain().

Slim_Http_Cookie::$expires
protected

Definition at line 57 of file Cookie.php.

Referenced by __construct(), and getExpires().

Slim_Http_Cookie::$httponly
protected

Definition at line 77 of file Cookie.php.

Referenced by __construct(), getHttpOnly(), and setHttpOnly().

Slim_Http_Cookie::$name
protected

Definition at line 47 of file Cookie.php.

Referenced by __construct(), getName(), and setName().

Slim_Http_Cookie::$path
protected

Definition at line 62 of file Cookie.php.

Referenced by __construct(), getPath(), and setPath().

Slim_Http_Cookie::$secure
protected

Definition at line 72 of file Cookie.php.

Referenced by __construct(), getSecure(), and setSecure().

Slim_Http_Cookie::$value
protected

Definition at line 52 of file Cookie.php.

Referenced by __construct(), getValue(), and setValue().


The documentation for this class was generated from the following file: