• PHP reference
  • Sandbox

Request

class Sandbox\Request extends ExtendableObject

Current request details.

Properties

string $method

string $source

string $path

string $url

string $base_url

boolean $ssl

array $args

array $originalArguments

array $files

Methods

__construct()

Request constructor.

mixed get(string $key, boolean $clean = true)

Get the GET-parameter with key $key.

Parameters

  • string $key
  • boolean $clean

Return Value

  • mixed

mixed post(string $key, boolean $clean = true)

Get the POST-parameter with key $key.

Parameters

  • string $key
  • boolean $clean

Return Value

  • mixed

boolean is(string $method)

Check if the current request method is equal to $method.

Parameters

  • string $method

Return Value

  • boolean

redirect(string $url)

Redirect user to URL.

$address also be a predefined keyword: - logout: Redirect to logout page - home: Go to homepage of current subdomain (/) - help: Go to help center

Parameters

  • string $url

string xss_clean(string|string[] $str)

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

Parameters

  • string|string[] $str Input data

Return Value

  • string

Inherited from ExtendableObject

final static ExtendableObject instance()

Get instance.

Return Value

final static boolean hasInstance()

Check whether there is an instance of this class available.

Return Value

  • boolean

final boolean extension($extension)

Call class method, if it exists.

Parameters

  • $extension

Return Value

  • boolean