Error

Extends \Core\Controller

package

Default

Methods

Constructor on run make an instance of the config class, language class and of view class

__construct() 
inherited

Display errors

display(mixed $errors, string $class = 'alert alert-danger') : mixed
static

Arguments

$errors

mixed

Error/s array

$class

string

Name of class to apply to div

Response

mixed

Return div/s

Get the client's IP address

getClientIp(boolean $checkProxy = true) : string
inherited

Arguments

$checkProxy

boolean

Response

string

Get name of controller

getControllerName() : string
inherited

Response

string

Retrieve a member of the $_COOKIE superglobal

getCookie(string $key = null, mixed $default = null) : mixed
inherited

If no $key is passed, returns the entire $_COOKIE array.

Arguments

$key

string

$default

mixed

Default value to use if key not found

Response

mixed

Returns null if key does not exist

Return the method by which the request was made

getMethod() : string
inherited

Response

string

Retrieve a member of the $_GET superglobal

getParam(string $key = null, mixed $default = null) : mixed
inherited

If no $key is passed, returns the entire $_GET array.

Arguments

$key

string

$default

mixed

Default value to use if key not found

Response

mixed

Returns null if key does not exist

Retrieve a member of the $_POST superglobal

getPost(string $key = null, mixed $default = null) : mixed
inherited

If no $key is passed, returns the entire $_POST array.

Arguments

$key

string

$default

mixed

Default value to use if key not found

Response

mixed

Returns null if key does not exist

Retrieve a member of the $_SERVER superglobal

getServer(string $key = null, mixed $default = null) : mixed
inherited

If no $key is passed, returns the entire $_SERVER array.

Arguments

$key

string

$default

mixed

Default value to use if key not found

Response

mixed

Returns null if key does not exist

404 page Action load a 404 page with the error message

indexAction() 

Was the request made by DELETE?

isDelete() : boolean
inherited

Response

boolean

Was the request made by GET?

isGet() : boolean
inherited

Response

boolean

Was the request made by HEAD?

isHead() : boolean
inherited

Response

boolean

Was the request made by OPTIONS?

isOptions() : boolean
inherited

Response

boolean

Was the request made by PATCH?

isPatch() : boolean
inherited

Response

boolean

Was the request made by POST?

isPost() : boolean
inherited

Response

boolean

Was the request made by PUT?

isPut() : boolean
inherited

Response

boolean

Redirect to chosen url

redirect(string $url) 
inherited static

Arguments

$url

string

the url to redirect to

Set name of controller

setControllerName( $val) 
inherited

Arguments

$val

Properties

_error

_error : 

Type(s)

view

view : 
inherited

Type(s)

language

language : 
inherited

Type(s)

name

name : 
inherited

Type(s)

config

config : 
inherited

Type(s)

flashMessage

flashMessage : 
inherited

Type(s)