Input class instance

The input class allows you to access HTTP parameters, load server variables and user agent details.

package Fuel
category Core
link http://docs.fuelphp.com/classes/input.html

 Methods

__construct()

__construct(\Fuel\Core\Request $new, \Fuel\Core\Input_Instance $input) 

Parameters

$new

$input

Set additional input variables

_set(string $method, array $input) : void

Parameters

$method

string

name of the HTTP method to set variables for, in lowercase

$input

array

assoc array of input fieldnames and values

Returns all of the GET, POST, PUT, PATCH or DELETE array's

all() : array

Returns

array

Fetch an item from the php://input for delete arguments

delete(string $index, mixed $default) : string | array

Parameters

$index

string

The index key

$default

mixed

The default value

Returns

stringarray

Detects and returns the current URI extension

extension() : string

Returns

string

Gets the specified GET variable.

get(string $index, string $default) : string | array

Parameters

$index

string

The index to get

$default

string

The default value

Returns

stringarray

Get the request body interpreted as JSON.

json(mixed $index, mixed $default) : array

Parameters

$index

mixed

$default

mixed

Returns

arrayparsed request body content.

Return's the input method used (GET, POST, DELETE, etc.)

method(string $default) : string

Parameters

$default

string

Returns

string

Fetch an item from either the GET, POST, PUT, PATCH or DELETE array

param(string $index, mixed $default) : string | array

Parameters

$index

string

The index key

$default

mixed

The default value

Returns

stringarray

Fetch an item from the php://input for patch arguments

patch(string $index, mixed $default) : string | array

Parameters

$index

string

The index key

$default

mixed

The default value

Returns

stringarray

Fetch an item from the POST array

post(string $index, mixed $default) : string | array

Parameters

$index

string

The index key

$default

mixed

The default value

Returns

stringarray

Fetch an item from the php://input for put arguments

put(string $index, mixed $default) : string | array

Parameters

$index

string

The index key

$default

mixed

The default value

Returns

stringarray

Returns PHP's raw input

raw() : array

Returns

array

Detects and returns the current URI based on a number of different server variables.

uri() : string

Exceptions

\FuelException

Returns

string

Get the request body interpreted as XML.

xml(mixed $index, mixed $default) : array

Parameters

$index

mixed

$default

mixed

Returns

arrayparsed request body content.

Hydrates the input array

hydrate() : void

 Properties

 

<p>The URI extension that was detected automatically</p>

$detected_ext : \Fuel\Core\$detected_ext

 

<p>The URI that was detected automatically</p>

$detected_uri : \Fuel\Core\$detected_uri

 

<p>All DELETE input</p>

$input_delete : array

 

<p>All GET input</p>

$input_get : array

 

<p>parsed request body as json</p>

$input_json : \Fuel\Core\$json

 

<p>All PATCH input</p>

$input_patch : array

 

<p>All POST input</p>

$input_post : array

 

<p>All PUT input</p>

$input_put : array

 

<p>parsed request body as xml</p>

$input_xml : \Fuel\Core\$xml

 

<p>raw PHP input</p>

$raw_input : string

 

<p>Active instance of Request</p>

$request : \Fuel\Core\$request