Inherits PntEvaluation.
Inherited by PntObjectNavigation.
|
static | getInstance ($path, $itemType=null) |
|
static | nav1Sort (&$array, $nav, $ascending=true) |
|
static | byNav1SortKey (&$array, $nav) |
|
static | collect_path ($array, $path, $itemType=null) |
|
static | distinct ($items) |
|
static | _getInstance ($path, $itemType=null) |
|
static | _byNav1SortKey (&$array, $nav) |
|
static | _nav1Sort (&$array, $nav, $ascending=true) |
|
static | getInstance ($key) |
|
static | _getInstance ($key) |
|
static _byNav1SortKey |
( |
& |
$array, |
|
|
|
$nav |
|
) |
| |
|
static |
static _getInstance |
( |
|
$path, |
|
|
|
$itemType = null |
|
) |
| |
|
static |
static _nav1Sort |
( |
& |
$array, |
|
|
|
$nav, |
|
|
|
$ascending = true |
|
) |
| |
|
static |
static byNav1SortKey |
( |
& |
$array, |
|
|
|
$nav |
|
) |
| |
|
static |
Return an array with the elements from the supplied one indexed by keys for sorting, i.e. from concatenating the results of the supplied navigation with the original keys, both padded to the length of the longest.
- Parameters
-
array | $array | the array holding the elements to be sorted |
| $nav | PntNavigation the navigation to use. ResultType must be primitive datatype |
- Returns
- Associative Array with keys for sorting and values from array param
- Exceptions
-
Multi value navigation from the argument over a single value path. if the argument is null, return null otherwise return an array with the results of navigating from each element under the same keys as those of the elements in the argument. If an error occurs, exit returning the error array $argument of mixed Array or Object
- Returns
- mixed result of the navigation
- Exceptions
-
static collect_path |
( |
|
$array, |
|
|
|
$path, |
|
|
|
$itemType = null |
|
) |
| |
|
static |
Multi value navigation from the argument using a path string if the argument is null, return null otherwise return an array with the results of navigating from each element under the same keys as those of the elements in the argument. If an error occurs, trigger E_USER_WARNING and return false.
Array $array String $path the path to navigate
- Returns
- variant result of the navigation
- Exceptions
-
static distinct |
( |
|
$items | ) |
|
|
static |
- Returns
- array of PntObject, each only once, in last occurrence order
- Parameters
-
evaluate |
( |
|
$item, |
|
|
|
$extra1 = null , |
|
|
|
$extra2 = null , |
|
|
|
$extra3 = null |
|
) |
| |
Single value navigation from the argument using the key. if the argument is null, return null if the argument is an array, get the next value using the key, else, if the argument is not an object, return an NntReflectionError if the argument has a getter method for the key, get the next value using the getter, else get the field named like the key. if next, return the result of _evaluat next with the next value. mixed $item Array or Object
- Returns
- mixed result of the navigation
- Exceptions
-
getFirstPropertyLabel |
( |
| ) |
|
static getInstance |
( |
|
$path, |
|
|
|
$itemType = null |
|
) |
| |
|
static |
get an instance of the proper subclass for navigating from the specified itemType over the specified path
- Parameters
-
path | String the navigation path with property names or keys separated by dots |
itemType | String 'Array', 'List' or className |
- Returns
- PntNavigation
- Exceptions
-
getPath |
( |
|
$length = null | ) |
|
- Parameters
-
int | $length | if positive, include the specified numer of steps, or all if the path is shorter if negative, exclude specified number of steps at the end, return null if this leaves no steps if not specified return the entire path |
- Returns
- string keys of the steps concatenated with '.' inbetween
static nav1Sort |
( |
& |
$array, |
|
|
|
$nav, |
|
|
|
$ascending = true |
|
) |
| |
|
static |
Return an array with the elements from the supplied one sorted by the results of the supplied navigation. and under-sorted by the keys from the supplied array ( this allows sub-sorting by first applying the second criterium and then again calling this method with the first) Keys are not retained in the result array Current implementation is case sentitive, this may change in future
- Parameters
-
array | array the array holding the elements to be sorted |
$nav | PntNavigation the navigation to sort by. ResultType must be primitive datatype |
$ascending | boolean wheather the sort order is ascending |
- Returns
- Associative Array with keys for sorting and values from array param
- Exceptions
-
setStepResultType |
( |
|
$value | ) |
|
Single value navigation step from the argument using the key. if the argument is null, return null if the argument is an array, get the next value using the key, else, if the argument is not an object, return an NntReflectionError if the argument has a getter method for the key, get the next value using the getter, else get the field named like the key. mixed $item Array or Object
- Returns
- mixed result of the navigation
- Exceptions
-
The documentation for this class was generated from the following file: