\duncan3dc\HelpersDict

Summary

Methods
Properties
Constants
value()
valueIfSet()
get()
getIfSet()
post()
postIfSet()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

value()

value(array $data, mixed $key, mixed $default) : mixed

Get an element from an array, or the default if it is not set or it's value is falsy.

Parameters

array $data

The array to get the element from

mixed $key

The key within the array to get

mixed $default

The default value to return if no element exists or it's value is falsy

Returns

mixed

valueIfSet()

valueIfSet(array $data, mixed $key, mixed $default) : mixed

Get an element from an array, or the default if it is not set.

Parameters

array $data

The array to get the element from

mixed $key

The key within the array to get

mixed $default

The default value to return if no element exists in the array or it's value is null

Returns

mixed

get()

get(mixed $key, mixed $default) : mixed

Convenience method to retrieve an element from $_GET superglobal.

Parameters

mixed $key

The key from $_GET to get

mixed $default

The default value to return if no element exists or it's value is falsy

Returns

mixed

getIfSet()

getIfSet(mixed $key, mixed $default) : mixed

Convenience method to retrieve an element from $_GET superglobal.

Parameters

mixed $key

The key from $_GET to get

mixed $default

The default value to return if no element exists or it's value is null

Returns

mixed

post()

post(mixed $key, mixed $default) : mixed

Convenience method to retrieve an element from $_POST superglobal.

Parameters

mixed $key

The key from $_POST to get

mixed $default

The default value to return if no element exists or it's value is falsy

Returns

mixed

postIfSet()

postIfSet(mixed $key, mixed $default) : mixed

Convenience method to retrieve an element from $_POST superglobal.

Parameters

mixed $key

The key from $_POST to get

mixed $default

The default value to return if no element exists or it's value is null

Returns

mixed