Свойство | Тип | Описание | |
---|---|---|---|
$domain | |||
$expires | |||
$httponly | |||
$name | |||
$path | |||
$rawValue | |||
$secure | |||
$value |
Метод | Описание | |
---|---|---|
__construct ( string $name, string $value, string $expires = null, string $path = null, string $domain = '', boolean $secure = false, boolean $httponly = true, boolean $encodedValue = false ) | Sets a cookie. | |
__toString ( ) : string | Returns the HTTP representation of the Cookie. | |
fromString ( string $cookie, string $url = null ) : |
Creates a Cookie instance from a Set-Cookie header value. | |
getDomain ( ) : string | Gets the domain of the cookie. | |
getExpiresTime ( ) : string | Gets the expires time of the cookie. | |
getName ( ) : string | Gets the name of the cookie. | |
getPath ( ) : string | Gets the path of the cookie. | |
getRawValue ( ) : string | Gets the raw value of the cookie. | |
getValue ( ) : string | Gets the value of the cookie. | |
isExpired ( ) : boolean | Returns true if the cookie has expired. | |
isHttpOnly ( ) : boolean | Returns the httponly flag of the cookie. | |
isSecure ( ) : boolean | Returns the secure flag of the cookie. |
Метод | Описание | |
---|---|---|
parseDate ( $dateValue ) |
public __construct ( string $name, string $value, string $expires = null, string $path = null, string $domain = '', boolean $secure = false, boolean $httponly = true, boolean $encodedValue = false ) | ||
$name | string | The cookie name |
$value | string | The value of the cookie |
$expires | string | The time the cookie expires |
$path | string | The path on the server in which the cookie will be available on |
$domain | string | The domain that the cookie is available |
$secure | boolean | Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client |
$httponly | boolean | The cookie httponly flag |
$encodedValue | boolean | Whether the value is encoded or not |
public __toString ( ) : string | ||
Результат | string | The HTTP representation of the Cookie |
public static fromString ( string $cookie, string $url = null ) : |
||
$cookie | string | A Set-Cookie header value |
$url | string | The base URL |
Результат | A Cookie instance |
public getExpiresTime ( ) : string | ||
Результат | string | The cookie expires time |
public getRawValue ( ) : string | ||
Результат | string | The cookie value |
public isHttpOnly ( ) : boolean | ||
Результат | boolean | The cookie httponly flag |