October\Rain\Support\Arr

Overview

Arr helper as an extension to Laravel

Extends
  • Illuminate\Support\Arr

Protected Properties

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties

  • $macros - The registered string macros. (defined in Illuminate\Support\Arr)

Public Methods

public static build()

public static build($array, $callback): array 

build a new array using a callback.

public static trans()

public static trans($arr): array 

trans will translate an array, usually for dropdown and checkboxlist options

Show inherited public methods

Inherited Public Methods

  • __call() - Dynamically handle calls to the class. (defined in Illuminate\Support\Arr)
  • __callStatic() - Dynamically handle calls to the class. (defined in Illuminate\Support\Arr)
  • accessible() - Determine whether the given value is array accessible. (defined in Illuminate\Support\Arr)
  • add() - Add an element to an array using "dot" notation if it doesn't exist. (defined in Illuminate\Support\Arr)
  • collapse() - Collapse an array of arrays into a single array. (defined in Illuminate\Support\Arr)
  • crossJoin() - Cross join the given arrays, returning all possible permutations. (defined in Illuminate\Support\Arr)
  • divide() - Divide an array into two arrays. One with keys and the other with values. (defined in Illuminate\Support\Arr)
  • dot() - Flatten a multi-dimensional associative array with dots. (defined in Illuminate\Support\Arr)
  • except() - Get all of the given array except for a specified array of keys. (defined in Illuminate\Support\Arr)
  • exists() - Determine if the given key exists in the provided array. (defined in Illuminate\Support\Arr)
  • first() - Return the first element in an array passing a given truth test. (defined in Illuminate\Support\Arr)
  • flatten() - Flatten a multi-dimensional array into a single level. (defined in Illuminate\Support\Arr)
  • flushMacros() - Flush the existing macros. (defined in Illuminate\Support\Arr)
  • forget() - Remove one or many array items from a given array using "dot" notation. (defined in Illuminate\Support\Arr)
  • get() - Get an item from an array using "dot" notation. (defined in Illuminate\Support\Arr)
  • has() - Check if an item or items exist in an array using "dot" notation. (defined in Illuminate\Support\Arr)
  • hasAny() - Determine if any of the keys exist in an array using "dot" notation. (defined in Illuminate\Support\Arr)
  • hasMacro() - Checks if macro is registered. (defined in Illuminate\Support\Arr)
  • isAssoc() - Determines if an array is associative. (defined in Illuminate\Support\Arr)
  • isList() - Determines if an array is a list. (defined in Illuminate\Support\Arr)
  • join() - Join all items using a string. The final items can use a separate glue string. (defined in Illuminate\Support\Arr)
  • keyBy() - Key an associative array by a field or using a callback. (defined in Illuminate\Support\Arr)
  • last() - Return the last element in an array passing a given truth test. (defined in Illuminate\Support\Arr)
  • macro() - Register a custom macro. (defined in Illuminate\Support\Arr)
  • map() - Run a map over each of the items in the array. (defined in Illuminate\Support\Arr)
  • mixin() - Mix another object into the class. (defined in Illuminate\Support\Arr)
  • only() - Get a subset of the items from the given array. (defined in Illuminate\Support\Arr)
  • pluck() - Pluck an array of values from an array. (defined in Illuminate\Support\Arr)
  • prepend() - Push an item onto the beginning of an array. (defined in Illuminate\Support\Arr)
  • prependKeysWith() - Prepend the key names of an associative array. (defined in Illuminate\Support\Arr)
  • pull() - Get a value from the array, and remove it. (defined in Illuminate\Support\Arr)
  • query() - Convert the array into a query string. (defined in Illuminate\Support\Arr)
  • random() - Get one or a specified number of random values from an array. (defined in Illuminate\Support\Arr)
  • set() - Set an array item to a given value using "dot" notation. (defined in Illuminate\Support\Arr)
  • shuffle() - Shuffle the given array and return the result. (defined in Illuminate\Support\Arr)
  • sort() - Sort the array using the given callback or "dot" notation. (defined in Illuminate\Support\Arr)
  • sortDesc() - Sort the array in descending order using the given callback or "dot" notation. (defined in Illuminate\Support\Arr)
  • sortRecursive() - Recursively sort an array by keys and values. (defined in Illuminate\Support\Arr)
  • toCssClasses() - Conditionally compile classes from an array into a CSS class list. (defined in Illuminate\Support\Arr)
  • toCssStyles() - Conditionally compile styles from an array into a style list. (defined in Illuminate\Support\Arr)
  • undot() - Convert a flatten "dot" notation array into an expanded array. (defined in Illuminate\Support\Arr)
  • where() - Filter the array using the given callback. (defined in Illuminate\Support\Arr)
  • whereNotNull() - Filter items where the value is not null. (defined in Illuminate\Support\Arr)
  • wrap() - If the given value is not an array and not null, wrap it in one. (defined in Illuminate\Support\Arr)

Protected Methods

Show inherited protected methods

Inherited Protected Methods

  • explodePluckParameters() - Explode the "value" and "key" arguments passed to "pluck". (defined in Illuminate\Support\Arr)