static array fromObject(
object The
$p_obj, [boolean
$recurse = true], [string
$regex = null]
)
|
|
Utility function to map an object to an array
Parameters:
|
object The |
$p_obj: |
source object |
|
boolean |
$recurse: |
True to recurve through multi-level objects |
|
string |
$regex: |
An optional regular expression to match on field names |
API Tags:
| Return: | The array mapped from the given object |
Information Tags:
static array getColumn(
&$array, string
$index, array
$array
)
|
|
Extracts a column from an array of arrays or objects
Parameters:
|
array |
$array: |
The source array |
|
string |
$index: |
The index of the column or name of object property |
|
|
&$array: |
|
API Tags:
| Return: | Column of values from the source array |
Information Tags:
static mixed getValue(
&$array, string
$name, [mixed
$default = null], [string
$type = ''], array
$array
)
|
|
Utility function to return a value from a named array or a specified default
Parameters:
|
array |
$array: |
A named array |
|
string |
$name: |
The key to search for |
|
mixed |
$default: |
The default value to give if no key found |
|
string |
$type: |
Return type for the variable (INT, FLOAT, STRING, WORD, BOOLEAN, ARRAY) |
|
|
&$array: |
|
API Tags:
| Return: | The value from the source array |
Information Tags:
static array sortObjects(
&$a, string
$k, [int
$direction = 1], array
$arr
)
|
|
Utility function to sort an array of objects on a given field
Parameters:
|
array |
$arr: |
An array of objects |
|
string |
$k: |
The key to sort on |
|
int |
$direction: |
Direction to sort in [1 = Ascending] [-1 = Descending] |
|
|
&$a: |
|
API Tags:
| Return: | The sorted array of objects |
Information Tags:
static void toInteger(
&$array, [mixed
$default = null], array
$array
)
|
|
Function to convert array to integer values
Parameters:
|
array |
$array: |
The source array to convert |
|
mixed |
$default: |
A default value (int|array) to assign if $array is not an array |
|
|
&$array: |
|
Information Tags:
static object The toObject(
&$array, [
$class = 'stdClass'], array
$array, string
$calss
)
|
|
Utility function to map an array to a stdClass object.
Parameters:
|
array |
$array: |
The array to map. |
|
string |
$calss: |
Name of the class to create |
|
|
&$array: |
|
|
|
$class: |
|
API Tags:
| Return: | object mapped from the given array |
Information Tags:
static void toString(
[
$array = null], [
$inner_glue = '='], [
$outer_glue = ' '], [
$keepOuterKey = false]
)
|
|
Parameters:
|
|
$array: |
|
|
|
$inner_glue: |
|
|
|
$outer_glue: |
|
|
|
$keepOuterKey: |
|
static int _sortObjects(
&$a,
&$b, array
$a, array
$b
)
|
|
Private callback function for sorting an array of objects on a key
Parameters:
|
array |
$a: |
An array of objects |
|
array |
$b: |
An array of objects |
|
|
&$a: |
|
|
|
&$b: |
|
API Tags:
Information Tags: