IRequestArray

Interface for the Request arrays such as post, get, cookie, session, etc.
Source
IRequestArray.php
Implementations
Cookie , Delete , Get , Post , Put , Session

Static Methods

clear

void IRequestArray::clear()

Empty all.

Returns

void

has

bool IRequestArray::has(string key)

Check if a key exists.

Arguments

    key (string)
    Key to be checked

Returns

bool
true=key exists

hasValue

bool IRequestArray::hasValue(string key, mixed val)

Check if a key has a given value A[key] === val.

Arguments

    key (string)
    Key to compare it's value
    val (mixed)
    Value to be compared to

Returns

bool
true=key has the given value

like

array IRequestArray::like(string key)

Get {key: value,} where the keys in source contain the "key" string inside them.

Since
Artaengine 1.2.2

Arguments

    key (string)
    String to be searched in "source" keys

Returns

array
{key:value,} a subset of "source" where keys contains "key"

remove

void IRequestArray::remove([string] key)

Remove key(s).

Arguments

    key ([string])
    The key or keys to be removed

Returns

void

set

void IRequestArray::set(string key, mixed val)

Set a value.

Arguments

    key (string)
    Key to set the value to
    val (mixed)
    Value to be set

Returns

void

with

array IRequestArray::with(string key, bool remove)

Get {key: value,} where the keys in source start with the "key".

Since
Artaengine 1.2.0

Arguments

    key (string)
    String to be searched in "source" keys
    remove (bool)
    true=remove "key" from the keys in the returned array

Returns

array
{key:value,} a subset of "source" where keys start with "key"

Methods

__get

mixed __get(string key)

Get a value.

Arguments

    key (string)
    The key to get it's value

Returns

mixed
The value set to the key or "null" if key not exists

__set

void __set(string key, mixed val)

Set a value.

Arguments

    key (string)
    Key to set the value to
    val (mixed)
    Value to be set

Returns

void