PHP Класс Pop\Web\Cookie

Автор: Nick Sagona, III ([email protected])
Наследование: implements ArrayAccess
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__get ( string $name ) : mixed Get method to return the value of the $_COOKIE global variable.
__isset ( string $name ) : boolean Return the isset value of the $_COOKIE global variable.
__unset ( string $name ) : void Unset the value in the $_COOKIE global variable.
clear ( array $options = null ) : void Clear (delete) all cookies via unset($cookie)
delete ( string $name, array $options = null ) : void Delete a cookie directly
getDomain ( ) : string Return the current cookie domain.
getExpire ( ) : integer Return the current cookie expiration
getInstance ( array $options = [] ) : Cookie Determine whether or not an instance of the cookie object exists already, and instantiate the object if it does not exist.
getIp ( ) : string Return the current IP address.
getPath ( ) : string Return the current cookie path.
isHttpOnly ( ) : boolean Return if the cookie is HTTP only
isSecure ( ) : boolean Return if the cookie is secure
set ( string $name, mixed $value, array $options = null ) : Cookie Set a property in the cookie object that is linked to the $_COOKIE global variable.

Приватные методы

Метод Описание
__construct ( array $options = [] ) : Cookie Constructor
setOptions ( array $options = [] ) : Cookie Private method to set options

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

__get() публичный Метод

Get method to return the value of the $_COOKIE global variable.
public __get ( string $name ) : mixed
$name string
Результат mixed

__isset() публичный Метод

Return the isset value of the $_COOKIE global variable.
public __isset ( string $name ) : boolean
$name string
Результат boolean

__unset() публичный Метод

Unset the value in the $_COOKIE global variable.
public __unset ( string $name ) : void
$name string
Результат void

clear() публичный Метод

Clear (delete) all cookies via unset($cookie)
public clear ( array $options = null ) : void
$options array
Результат void

delete() публичный Метод

Delete a cookie directly
public delete ( string $name, array $options = null ) : void
$name string
$options array
Результат void

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

Return the current cookie domain.
public getDomain ( ) : string
Результат string

getExpire() публичный Метод

Return the current cookie expiration
public getExpire ( ) : integer
Результат integer

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

Determine whether or not an instance of the cookie object exists already, and instantiate the object if it does not exist.
public static getInstance ( array $options = [] ) : Cookie
$options array
Результат Cookie

getIp() публичный Метод

Return the current IP address.
public getIp ( ) : string
Результат string

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

Return the current cookie path.
public getPath ( ) : string
Результат string

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

Return if the cookie is HTTP only
public isHttpOnly ( ) : boolean
Результат boolean

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

Return if the cookie is secure
public isSecure ( ) : boolean
Результат boolean

set() публичный Метод

Set a property in the cookie object that is linked to the $_COOKIE global variable.
public set ( string $name, mixed $value, array $options = null ) : Cookie
$name string
$value mixed
$options array
Результат Cookie