Class yii\helpers\ArrayHelper

Inheritanceyii\helpers\ArrayHelper » yii\helpers\BaseArrayHelper
Available since version2.0
Source Code

ArrayHelper provides additional array functionality that you can use in your application.

For more details and usage information on ArrayHelper, see the guide article on array helpers.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
filter() Filters array according to rules specified. yii\helpers\BaseArrayHelper
getColumn() Returns the values of a specified column in an array. yii\helpers\BaseArrayHelper
getValue() Retrieves the value of an array element or object property with the given key or property name. yii\helpers\BaseArrayHelper
htmlDecode() Decodes HTML entities into the corresponding characters in an array of strings. yii\helpers\BaseArrayHelper
htmlEncode() Encodes special characters in an array of strings into HTML entities. yii\helpers\BaseArrayHelper
index() Indexes and/or groups the array according to a specified key. yii\helpers\BaseArrayHelper
isAssociative() Returns a value indicating whether the given array is an associative array. yii\helpers\BaseArrayHelper
isIn() Check whether an array or Traversable contains an element. yii\helpers\BaseArrayHelper
isIndexed() Returns a value indicating whether the given array is an indexed array. yii\helpers\BaseArrayHelper
isSubset() Checks whether an array or Traversable is a subset of another array or Traversable. yii\helpers\BaseArrayHelper
isTraversable() Checks whether a variable is an array or Traversable. yii\helpers\BaseArrayHelper
keyExists() Checks if the given array contains the specified key. yii\helpers\BaseArrayHelper
map() Builds a map (key-value pairs) from a multidimensional array or an array of objects. yii\helpers\BaseArrayHelper
merge() Merges two or more arrays into one recursively. yii\helpers\BaseArrayHelper
multisort() Sorts an array of objects or arrays (with the same structure) by one or several keys. yii\helpers\BaseArrayHelper
remove() Removes an item from an array and returns the value. If the key does not exist in the array, the default value will be returned instead. yii\helpers\BaseArrayHelper
removeValue() Removes items with matching values from the array and returns the removed items. yii\helpers\BaseArrayHelper
setValue() Writes a value into an associative array at the key path specified. yii\helpers\BaseArrayHelper
toArray() Converts an object or an array of objects into an array. yii\helpers\BaseArrayHelper