classe Request (Voir la source)

Méthodes

static Request
getInstance()

Singletons loader

mixed
has(string $key)

Check if key is exists

array
all()

Get all input value

string
path()

Get uri send by client.

string
hostname()

Get the host name of the server.

string
url()

Get url sent by client.

string
origin()

Origin the name of the server + the scheme

string
time()

Get path sent by client.

string
method()

Returns the method of the request.

bool
isPost()

Check if the query is POST

bool
isGet()

Check if the query is of type GET

bool
isPut()

Check if the query is of type PUT

bool
isDelete()

Check if the query is DELETE

file(string $key)

Load the factory for FILES

static bool
hasFile(mixed $file)

Check if file exists

mixed
old(mixed $key)

Get previous request data

bool
isAjax()

Check if we are in the case of an AJAX request.

int
is(string $match)

Check if a url matches with the pattern

string
ip()

Get client address

string
port()

Get client port

string
referer()

Get the source of the current request.

string|null
locale()

Get the request locale.

string
lang()

Get request lang.

mixed
protocol()

Get request protocol

mixed
isProtocol(string $protocol)

Check the protocol of the request

mixed
isSecure()

Check if the secure protocol

bool|string
getHeader(string $key)

Get Request header

bool
hasHeader(string $key)

Check if a header exists.

session()

Get session information

user(string|null $guard = null)

Get auth user information

mixed
cookie(string $property = null)

Get cookie

mixed
get(string $key, mixed $default = null)

Retrieve a value or a collection of values.

array
only(array $exceptions)

Retrieves the values contained in the exception table

ignore($ignores)

Pas de description

validate(array $rule)

Validate incoming data

mixed
setBag(string $name, mixed $value)

Set the value in request bag

mixed
getBag($name)

Get the value in request bag

mixed
__get($property)

__call

Détails

static Request getInstance()

Singletons loader

Valeur de retour

Request

mixed has(string $key)

Check if key is exists

Paramètres

string $key

Valeur de retour

mixed

array all()

Get all input value

Valeur de retour

array

string path()

Get uri send by client.

Valeur de retour

string

string hostname()

Get the host name of the server.

Valeur de retour

string

string url()

Get url sent by client.

Valeur de retour

string

string origin()

Origin the name of the server + the scheme

Valeur de retour

string

string time()

Get path sent by client.

Valeur de retour

string

string method()

Returns the method of the request.

Valeur de retour

string

bool isPost()

Check if the query is POST

Valeur de retour

bool

bool isGet()

Check if the query is of type GET

Valeur de retour

bool

bool isPut()

Check if the query is of type PUT

Valeur de retour

bool

bool isDelete()

Check if the query is DELETE

Valeur de retour

bool

UploadFile|Collection file(string $key)

Load the factory for FILES

Paramètres

string $key

Valeur de retour

UploadFile|Collection

static bool hasFile(mixed $file)

Check if file exists

Paramètres

mixed $file

Valeur de retour

bool

mixed old(mixed $key)

Get previous request data

Paramètres

mixed $key

Valeur de retour

mixed

bool isAjax()

Check if we are in the case of an AJAX request.

Valeur de retour

bool

int is(string $match)

Check if a url matches with the pattern

Paramètres

string $match

Un regex

Valeur de retour

int

string ip()

Get client address

Valeur de retour

string

string port()

Get client port

Valeur de retour

string

string referer()

Get the source of the current request.

Valeur de retour

string

string|null locale()

Get the request locale.

The local is the original language of the client e.g fr => locale = fr_FR e.g en => locale [ en_US, en_EN]

Valeur de retour

string|null

string lang()

Get request lang.

Valeur de retour

string

mixed protocol()

Get request protocol

Valeur de retour

mixed

mixed isProtocol(string $protocol)

Check the protocol of the request

Paramètres

string $protocol

Valeur de retour

mixed

mixed isSecure()

Check if the secure protocol

Valeur de retour

mixed

bool|string getHeader(string $key)

Get Request header

Paramètres

string $key

Valeur de retour

bool|string

bool hasHeader(string $key)

Check if a header exists.

Paramètres

string $key

Valeur de retour

bool

Session session()

Get session information

Valeur de retour

Session

Authentication|null user(string|null $guard = null)

Get auth user information

Paramètres

string|null $guard

Valeur de retour

Authentication|null

Get cookie

Paramètres

string $property

Valeur de retour

mixed

mixed get(string $key, mixed $default = null)

Retrieve a value or a collection of values.

Paramètres

string $key
mixed $default

Valeur de retour

mixed

array only(array $exceptions)

Retrieves the values contained in the exception table

Paramètres

array $exceptions

Valeur de retour

array

ignore($ignores)

Pas de description

Paramètres

$ignores

Validate validate(array $rule)

Validate incoming data

Paramètres

array $rule

Valeur de retour

Validate

mixed setBag(string $name, mixed $value)

Set the value in request bag

Paramètres

string $name
mixed $value

Valeur de retour

mixed

mixed getBag($name)

Get the value in request bag

Paramètres

$name

Valeur de retour

mixed

mixed __get($property)

__call

Paramètres

$property

Valeur de retour

mixed