PHP Интерфейс Visitor

Показать файл Открыть проект Примеры использования интерфейса

Открытые свойства

Свойство Тип Описание
$banned banned ips

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

Свойство Тип Описание
$acceptedLanguageCode cache for the detected language code

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

Метод Описание
acceptance ( string $type ) : float Returns a number between 0 and 1 that defines how "accepted" a specified MIME type is for the visitor's browser using the HTTP Accept header
acceptedLanguage ( ) : string Returns the user's accepted language
acceptedLanguageCode ( ) : string Returns the user's accepted language code
accepts ( string $type ) : boolean Returns whether a specified MIME type is accepted by the visitor's browser
banned ( ) : boolean Checks if the ip of the current visitor is banned
ip ( ) : string Returns the ip address of the current visitor
referer ( ) : string Nobody can remember if it is written with on or two r
referrer ( ) : string Returns the referrer if available
ua ( ) : string Returns the user agent string of the current visitor
userAgent ( ) : string A more readable but longer alternative for ua()

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

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

Returns a number between 0 and 1 that defines how "accepted" a specified MIME type is for the visitor's browser using the HTTP Accept header
public static acceptance ( string $type ) : float
$type string MIME type like "text/html"
Результат float Number between 0 (not accepted) and 1 (very accepted)

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

Returns the user's accepted language
public static acceptedLanguage ( ) : string
Результат string

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

Returns the user's accepted language code
public static acceptedLanguageCode ( ) : string
Результат string

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

Returns whether a specified MIME type is accepted by the visitor's browser
public static accepts ( string $type ) : boolean
$type string MIME type like "text/html"
Результат boolean

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

Checks if the ip of the current visitor is banned
public static banned ( ) : boolean
Результат boolean

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

Returns the ip address of the current visitor
public static ip ( ) : string
Результат string

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

Nobody can remember if it is written with on or two r
public static referer ( ) : string
Результат string

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

Returns the referrer if available
public static referrer ( ) : string
Результат string

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

Returns the user agent string of the current visitor
public static ua ( ) : string
Результат string

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

A more readable but longer alternative for ua()
public static userAgent ( ) : string
Результат string

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

$acceptedLanguageCode защищенное статическое свойство

cache for the detected language code
protected static $acceptedLanguageCode

$banned публичное статическое свойство

banned ips
public static $banned