• PHP reference

Input

class Input

Provides static access to POST, GET, COOKIE and SESSION parameters, e.g. Input::get('foo') return bar for a URL ending in ?foo=bar.

Methods

static mixed|false post(string $key)

Get the POST request parameter with key $key.

Parameters

  • string $key

Return Value

  • mixed|false

static boolean raw(string $key)

Get raw POST request parameter value.

Parameters

  • string $key

Return Value

  • boolean

static mixed|false get(string $key)

Get the GET request query parameter with key $key.

Parameters

  • string $key

Return Value

  • mixed|false

static mixed|false session(string $key)

Get the SESSION variable with key $key.

Parameters

  • string $key

Return Value

  • mixed|false

static mixed|false cookie(string $key)

Get the COOKIE variable with key $key.

Parameters

  • string $key

Return Value

  • mixed|false

static string clean(string|string[] $str)

Sanitizes user input data to prevent Cross Site Scripting (XSS) hacks.

Parameters

  • string|string[] $str Input data

Return Value

  • string