Parameters
extends ArrayObject
in package
implements
ParametersInterface
Interfaces, Classes, Traits and Enums
Table of Contents
- __construct() : mixed
- Constructor
- fromArray() : void
- Populate from native PHP array
- fromString() : void
- Populate from query string
- get() : mixed
- Get
- offsetGet() : mixed
- Retrieve by key
- set() : Parameters
- Set
- toArray() : array<string|int, mixed>
- Serialize to native PHP array
- toString() : string
- Serialize to query string
Methods
__construct()
Constructor
public
__construct([array<string|int, mixed> $values = null ]) : mixed
Enforces that we have an array, and enforces parameter access to array elements.
Parameters
- $values : array<string|int, mixed> = null
Return values
mixed —fromArray()
Populate from native PHP array
public
fromArray(array<string|int, mixed> $values) : void
Parameters
- $values : array<string|int, mixed>
Return values
void —fromString()
Populate from query string
public
fromString(string $string) : void
Parameters
- $string : string
Return values
void —get()
Get
public
get(string $name[, mixed $default = null ]) : mixed
Parameters
- $name : string
- $default : mixed = null
-
optional default value
Return values
mixed —offsetGet()
Retrieve by key
public
offsetGet(string $name) : mixed
Returns null if the key does not exist.
Parameters
- $name : string
Return values
mixed —set()
Set
public
set(string $name, mixed $value) : Parameters
Parameters
- $name : string
- $value : mixed
Return values
Parameters —toArray()
Serialize to native PHP array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —toString()
Serialize to query string
public
toString() : string