Array utilities.
More...
|
static | isAssociative ($array) |
| Tests if array is associative. More...
|
|
static | extractKeys ($array, $keys) |
| Returns a new array with the keys $keys. More...
|
|
static | getValue ($array, $key, $pos) |
|
static | getDefaultValue ($array, $key, $default) |
|
static | asPhpArray ($array, $prefix="", $depth=1, $format=false) |
|
static | asJSON ($array) |
|
static | remove ($array, $search) |
|
static | removeByKey ($array, $key) |
| Removes from array by key. More...
|
|
static | removeOne ($array, $search) |
|
static | update (&$array, $search, $newValue) |
|
static | doubleBackSlashes (&$array) |
|
|
static | parseValue ($v, $prefix="", $depth=1, $format=false) |
|
Array utilities.
- Author
- jc
Definition at line 10 of file UArray.php.
◆ asJSON()
◆ asPhpArray()
static asPhpArray |
( |
|
$array, |
|
|
|
$prefix = "" , |
|
|
|
$depth = 1 , |
|
|
|
$format = false |
|
) |
| |
|
static |
◆ doubleBackSlashes()
static doubleBackSlashes |
( |
& |
$array | ) |
|
|
static |
◆ extractKeys()
static extractKeys |
( |
|
$array, |
|
|
|
$keys |
|
) |
| |
|
static |
Returns a new array with the keys $keys.
- Parameters
-
array | $array | an associative array |
array | $keys | some keys |
- Returns
- array
Definition at line 27 of file UArray.php.
◆ getDefaultValue()
static getDefaultValue |
( |
|
$array, |
|
|
|
$key, |
|
|
|
$default |
|
) |
| |
|
static |
◆ getValue()
static getValue |
( |
|
$array, |
|
|
|
$key, |
|
|
|
$pos |
|
) |
| |
|
static |
◆ isAssociative()
static isAssociative |
( |
|
$array | ) |
|
|
static |
Tests if array is associative.
- Parameters
-
- Returns
- boolean
Definition at line 17 of file UArray.php.
◆ parseValue()
static parseValue |
( |
|
$v, |
|
|
|
$prefix = "" , |
|
|
|
$depth = 1 , |
|
|
|
$format = false |
|
) |
| |
|
staticprivate |
◆ remove()
static remove |
( |
|
$array, |
|
|
|
$search |
|
) |
| |
|
static |
◆ removeByKey()
static removeByKey |
( |
|
$array, |
|
|
|
$key |
|
) |
| |
|
static |
Removes from array by key.
- Parameters
-
array | $array | |
int | string | $key | |
- Returns
- array
Definition at line 99 of file UArray.php.
◆ removeOne()
static removeOne |
( |
|
$array, |
|
|
|
$search |
|
) |
| |
|
static |
◆ update()
static update |
( |
& |
$array, |
|
|
|
$search, |
|
|
|
$newValue |
|
) |
| |
|
static |
The documentation for this class was generated from the following file: