\JArrayHelper
JArrayHelper is an array utility class for doing all sorts of odds and ends with arrays.
Synopsis
class JArrayHelper
{
- // members
- protected $sortCase;
- protected $sortDirection;
- protected $sortKey;
- protected $sortLocale;
- // methods
- public static void toInteger()
- public static toObject()
- public static string toString()
- public static array fromObject()
- protected static array _fromObject()
- public static array getColumn()
- public static mixed getValue()
- public static array invert()
- public static boolean isAssociative()
- public static array pivot()
- public static array sortObjects()
- protected static integer _sortObjects()
- public static array arrayUnique()
Members
protected
- $sortCase
—
mixed
Option to perform case-sensitive sorts. - $sortDirection
—
mixed
Option to set the sort direction. - $sortKey
—
string
Option to set the object key to sort on. - $sortLocale
—
mixed
Option to perform a language aware sort.
Methods
protected
- _fromObject() — Utility function to map an object or array to an array
- _sortObjects() — Callback function for sorting an array of objects on a key
public
- arrayUnique() — Multidimensional array safe unique test
- fromObject() — Utility function to map an object to an array
- getColumn() — Extracts a column from an array of arrays or objects
- getValue() — Utility function to return a value from a named array or a specified default
- invert() — Takes an associative array of arrays and inverts the array keys to values using the array values as keys.
- isAssociative() — Method to determine if an array is an associative array.
- pivot() — Pivots an array to create a reverse lookup of an array of scalars, arrays or objects.
- sortObjects() — Utility function to sort an array of objects on a given field
- toInteger() — Function to convert array to integer values
- toObject() — Utility function to map an array to a stdClass object.
- toString() — Utility function to map an array to a string.