ParametersInterface
extends
ArrayAccess, Countable, Serializable, Traversable
in
Basically, an ArrayObject. You could simply define something like: class QueryParams extends ArrayObject implements Parameters {} and have 90% of the functionality
Tags
Table of Contents
Methods
- __construct() : mixed
- Constructor
- fromArray() : mixed
- From array
- fromString() : mixed
- From string
- get() : mixed
- set() : ParametersInterface
- toArray() : mixed
- To array
- toString() : string
- To string
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed>|null $values = null ]) : mixed
Parameters
- $values : array<string|int, mixed>|null = null
fromArray()
From array
public
fromArray(array<string|int, mixed> $values) : mixed
Allow deserialization from standard array
Parameters
- $values : array<string|int, mixed>
fromString()
From string
public
fromString(string $string) : mixed
Allow deserialization from raw body; e.g., for PUT requests
Parameters
- $string : string
get()
public
get(TKey $name[, TValue|null $default = null ]) : mixed
Parameters
- $name : TKey
- $default : TValue|null = null
set()
public
set(TKey $name, TValue $value) : ParametersInterface
Parameters
- $name : TKey
- $value : TValue
Return values
ParametersInterfacetoArray()
To array
public
toArray() : mixed
Allow serialization back to standard array
toString()
To string
public
toString() : string
Allow serialization to query format; e.g., for PUT or POST requests