PHP Класс r, kirby

Наследование: extends FireKit\Database\ActiveRecord\ActiveRecord
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
body ( ) : array Returns the request body from POST requests for example
data ( ) fetch all data from the request and sanitize it
get ( mixed $key = false, mixed $default = null ) : mixed Gets a request value by key
is_ajax ( ) : boolean Checks if the current request is an AJAX request
is_delete ( ) : boolean Checks if the current request is a DELETE request
is_get ( ) : boolean Checks if the current request is a GET request
is_post ( ) : boolean Checks if the current request is a POST request
is_put ( ) : boolean Checks if the current request is a PUT request
method ( ) : string Returns the current request method
referer ( string $default = null ) : string Returns the HTTP_REFERER
sanitize ( array $data ) : array Sanitizes the incoming data
set ( mixed $key, mixed $value = null ) Sets a request value by key

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

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

Returns the request body from POST requests for example
static public body ( ) : array
Результат array

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

fetch all data from the request and sanitize it
static public data ( )

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

Gets a request value by key
static public get ( mixed $key = false, mixed $default = null ) : mixed
$key mixed The key to look for. Pass false or null to return the entire request array.
$default mixed Optional default value, which should be returned if no element has been found
Результат mixed

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

Checks if the current request is an AJAX request
static public is_ajax ( ) : boolean
Результат boolean

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

Checks if the current request is a DELETE request
static public is_delete ( ) : boolean
Результат boolean

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

Checks if the current request is a GET request
static public is_get ( ) : boolean
Результат boolean

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

Checks if the current request is a POST request
static public is_post ( ) : boolean
Результат boolean

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

Checks if the current request is a PUT request
static public is_put ( ) : boolean
Результат boolean

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

Returns the current request method
static public method ( ) : string
Результат string POST, GET, DELETE, PUT

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

Returns the HTTP_REFERER
static public referer ( string $default = null ) : string
$default string Define a default URL if no referer has been found
Результат string

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

Sanitizes the incoming data
static public sanitize ( array $data ) : array
$data array
Результат array

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

Sets a request value by key
static public set ( mixed $key, mixed $value = null )
$key mixed The key to define
$value mixed The value for the passed key