PHP Class r, kirby

Inheritance: extends FireKit\Database\ActiveRecord\ActiveRecord
Afficher le fichier Open project: bastianallgeier/kirby Class Usage Examples

Méthodes publiques

Méthode Description
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

Method Details

body() static public méthode

Returns the request body from POST requests for example
static public body ( ) : array
Résultat array

data() static public méthode

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

get() static public méthode

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
Résultat mixed

is_ajax() static public méthode

Checks if the current request is an AJAX request
static public is_ajax ( ) : boolean
Résultat boolean

is_delete() static public méthode

Checks if the current request is a DELETE request
static public is_delete ( ) : boolean
Résultat boolean

is_get() static public méthode

Checks if the current request is a GET request
static public is_get ( ) : boolean
Résultat boolean

is_post() static public méthode

Checks if the current request is a POST request
static public is_post ( ) : boolean
Résultat boolean

is_put() static public méthode

Checks if the current request is a PUT request
static public is_put ( ) : boolean
Résultat boolean

method() static public méthode

Returns the current request method
static public method ( ) : string
Résultat string POST, GET, DELETE, PUT

referer() static public méthode

Returns the HTTP_REFERER
static public referer ( string $default = null ) : string
$default string Define a default URL if no referer has been found
Résultat string

sanitize() static public méthode

Sanitizes the incoming data
static public sanitize ( array $data ) : array
$data array
Résultat array

set() static public méthode

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