PHP Класс Symfony\Component\BrowserKit\Cookie

Автор: Fabien Potencier ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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 ) : Cookie 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 )

Описание методов

__construct() публичный метод

Sets a cookie.
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

__toString() публичный метод

Returns the HTTP representation of the Cookie.
public __toString ( ) : string
Результат string The HTTP representation of the Cookie

fromString() публичный статический метод

Creates a Cookie instance from a Set-Cookie header value.
public static fromString ( string $cookie, string $url = null ) : Cookie
$cookie string A Set-Cookie header value
$url string The base URL
Результат Cookie A Cookie instance

getDomain() публичный метод

Gets the domain of the cookie.
public getDomain ( ) : string
Результат string The cookie domain

getExpiresTime() публичный метод

Gets the expires time of the cookie.
public getExpiresTime ( ) : string
Результат string The cookie expires time

getName() публичный метод

Gets the name of the cookie.
public getName ( ) : string
Результат string The cookie name

getPath() публичный метод

Gets the path of the cookie.
public getPath ( ) : string
Результат string The cookie path

getRawValue() публичный метод

Gets the raw value of the cookie.
public getRawValue ( ) : string
Результат string The cookie value

getValue() публичный метод

Gets the value of the cookie.
public getValue ( ) : string
Результат string The cookie value

isExpired() публичный метод

Returns true if the cookie has expired.
public isExpired ( ) : boolean
Результат boolean true if the cookie has expired, false otherwise

isHttpOnly() публичный метод

Returns the httponly flag of the cookie.
public isHttpOnly ( ) : boolean
Результат boolean The cookie httponly flag

isSecure() публичный метод

Returns the secure flag of the cookie.
public isSecure ( ) : boolean
Результат boolean The cookie secure flag

Описание свойств

$domain защищенное свойство

protected $domain

$expires защищенное свойство

protected $expires

$httponly защищенное свойство

protected $httponly

$name защищенное свойство

protected $name

$path защищенное свойство

protected $path

$rawValue защищенное свойство

protected $rawValue

$secure защищенное свойство

protected $secure

$value защищенное свойство

protected $value