A
Arr — Class in namespace Bolt\Collection
Array functions. All of these methods accept Traversable
or ArrayAccess
objects in addition to arrays. Arr ::assertAccessible () — Method in class Arr
Asserts that the given value is an array or an object implementing ArrayAccess
. Bag ::add () — Method in class Bag
Adds an item to the end of this bag. MutableBag ::add () — Method in class MutableBag
Adds an item to the end of this bag. B
Bag — Class in namespace Bolt\Collection
An OO implementation of PHP's array functionality and more (minus mutability). C
Arr ::column () — Method in class Arr
Return the values from a single column in the $input
array, identified by the $columnKey
. Bag ::combine () — Method in class Bag
Creates a bag by using one collection for keys and another for its values. Bag ::createFrom () — Method in class Bag
Creates a new instance from the specified items. Bag ::count () — Method in class Bag
Returns the number of items in this bag. Bag ::call () — Method in class Bag
Calls the $callable
to modify the items. Bag ::clean () — Method in class Bag
Returns a bag with falsely values filtered out. Bag ::column () — Method in class Bag
Returns a bag with the values from a single column, identified by the $columnKey
. Bag ::chunk () — Method in class Bag
Returns a bag with the items split into chunks. Bag ::countValues () — Method in class Bag
Returns a bag with values mapped to the number of times they are in the bag. Bag ::clear () — Method in class Bag
Remove all items from bag. MutableBag ::clear () — Method in class MutableBag
Remove all items from bag. D
Bag ::defaults () — Method in class Bag
Returns a bag with the items from the $collection
added to the items in this bag
if they do not already exist by comparing keys. The opposite of replace . Bag ::defaultsRecursive () — Method in class Bag
Returns a bag with the items from the $collection
recursively added to the items in this bag
if they do not already exist by comparing keys. The opposite of replaceRecursive . Bag ::diff () — Method in class Bag
Returns a bag without the values that are also in $collection
. Bag ::diffBy () — Method in class Bag
Returns a bag without the values that are also in $collection
based on the $iteratee
function. Bag ::diffKeys () — Method in class Bag
Returns a bag without the keys that are also in $collection
. Bag ::diffKeysBy () — Method in class Bag
Returns a bag without the keys that are also in $collection
based on the $iteratee
function. F
Arr ::from () — Method in class Arr
Converts an iterable
, null
, or stdClass
to an array. Arr ::fromRecursive () — Method in class Arr
Recursively converts an iterable
to nested arrays. Arr ::flatten () — Method in class Arr
Flattens an iterable. Bag ::from () — Method in class Bag
Create a bag from a variety of collections. Bag ::fromRecursive () — Method in class Bag
Takes the items and recursively converts them to Bags. Bag ::first () — Method in class Bag
Returns the first item in the list or null if empty. Bag ::find () — Method in class Bag
Returns the first item that matches the $predicate
or null. Bag ::findLast () — Method in class Bag
Returns the last item that matches the $predicate
or null. Bag ::findKey () — Method in class Bag
Returns the first key that matches the $predicate
or null. Bag ::findLastKey () — Method in class Bag
Returns the last key that matches the $predicate
or null. Bag ::filter () — Method in class Bag
Returns a bag with the items that satisfy the $predicate
. Bag ::flip () — Method in class Bag
Returns a bag with all keys exchanged with their associated values. Bag ::flatten () — Method in class Bag
Returns a bag with the items flattened. G
Arr ::get () — Method in class Arr
Gets a value from an array or ArrayAccess
object using path syntax to retrieve nested data. Bag ::get () — Method in class Bag
Returns an item by its key. Bag ::getPath () — Method in class Bag
Returns an item using path syntax to retrieve nested data. H
Arr ::has () — Method in class Arr
Returns whether a key exists from an array or ArrayAccess
object using path syntax to check nested data. Bag ::has () — Method in class Bag
Returns whether an item exists for the given key. Bag ::hasPath () — Method in class Bag
Returns whether a key exists using path syntax to check nested data. Bag ::hasItem () — Method in class Bag
Returns whether the item is in the bag. I
Arr ::isAccessible () — Method in class Arr
Returns whether the value is an array or an object implementing ArrayAccess
. Arr ::isAssociative () — Method in class Arr
Returns whether the $iterable
is an associative mapping. Arr ::isIndexed () — Method in class Arr
Returns whether the $iterable
is an indexed list - zero indexed and sequential. $Bag — Property in class Bag
Bag ::isEmpty () — Method in class Bag
Checks whether the bag is empty. Bag ::isAssociative () — Method in class Bag
Returns whether the items in this bag are key/value pairs. Bag ::isIndexed () — Method in class Bag
Returns whether the items in this bag are zero indexed and sequential. Bag ::indexOf () — Method in class Bag
Gets the first index/key of a given item. Bag ::immutable () — Method in class Bag
Returns an immutable bag with the items from this bag. Bag ::intersect () — Method in class Bag
Returns a bag with only the values that are also in $collection
. Bag ::intersectBy () — Method in class Bag
Returns a bag with only the values that are also in $collection
based on the $iteratee
function. Bag ::intersectKeys () — Method in class Bag
Returns a bag with only the keys that are also in $collection
. Bag ::intersectKeysBy () — Method in class Bag
Returns a bag with only the keys that are also in $collection
based on the $iteratee
function. ImmutableBag — Class in namespace Bolt\Collection
J
Bag ::join () — Method in class Bag
Joins the list to a string. K
Bag ::keys () — Method in class Bag
Returns a bag with all the keys of the items. L
Bag ::last () — Method in class Bag
Returns the last item in the list or null if empty. Bag ::lastIndexOf () — Method in class Bag
Gets the last index/key of a given item. M
Arr ::mapRecursive () — Method in class Arr
Returns an array with the $callable
applied to each leaf value in the $iterable
. Bag ::mutable () — Method in class Bag
Returns a mutable bag with the items from this bag. Bag ::map () — Method in class Bag
Applies the $callable
to each value in the bag and returns
a new bag with the items returned by the function. Bag ::mapKeys () — Method in class Bag
Applies the given function to each key in the bag and returns
a new bag with the keys returned by the function and their values. Bag ::merge () — Method in class Bag
Returns a bag with the items merged with the given list. MutableBag — Class in namespace Bolt\Collection
An OO implementation of PHP's array functionality and more. O
Bag ::of () — Method in class Bag
Creates a list from the arguments given. Bag ::omit () — Method in class Bag
Returns a bag without $keys
. P
Bag ::product () — Method in class Bag
Returns the product of the values in this list. Bag ::partition () — Method in class Bag
Partitions the items into two bags according to the $predicate
. Bag ::pad () — Method in class Bag
Returns a bag with the items padded to the $size
with the $value
. Bag ::pick () — Method in class Bag
Returns a bag with only $keys
. Bag ::prepend () — Method in class Bag
Adds an item to the beginning of this bag. MutableBag ::prepend () — Method in class MutableBag
Adds an item to the beginning of this bag. R
Arr ::remove () — Method in class Arr
Removes and returns a value from an array or ArrayAccess
object using path syntax to remove nested data. Arr ::replaceRecursive () — Method in class Arr
Replaces values from second iterable into first iterable recursively. Bag ::randomValue () — Method in class Bag
Returns a random value. Bag ::randomKey () — Method in class Bag
Returns a random key. Bag ::reject () — Method in class Bag
Returns a bag with the items that do not satisfy the $predicate
. The opposite of filter . Bag ::replace () — Method in class Bag
Replaces items in this bag from the $collection
by comparing keys and returns the result. Bag ::replaceRecursive () — Method in class Bag
Returns a bag with the items replaced recursively from the $collection
. Bag ::reduce () — Method in class Bag
Iteratively reduce the items to a single value using the $callback
function. Bag ::randomValues () — Method in class Bag
Returns a bag with a random number of key/value pairs. Bag ::randomKeys () — Method in class Bag
Returns a list with a random number of keys (as values). Bag ::reverse () — Method in class Bag
Returns a bag with the items reversed. Bag ::remove () — Method in class Bag
Removes and returns the item at the specified $key
from the bag. Bag ::removeItem () — Method in class Bag
Removes the given item from the bag if it is found. Bag ::removeFirst () — Method in class Bag
Removes and returns the first item in the list. Bag ::removeLast () — Method in class Bag
Removes and returns the last item in the list. MutableBag ::remove () — Method in class MutableBag
Removes and returns the item at the specified $key
from the bag. MutableBag ::removePath () — Method in class MutableBag
Removes and returns a value using path syntax to retrieve nested data. MutableBag ::removeItem () — Method in class MutableBag
Removes the given item from the bag if it is found. MutableBag ::removeFirst () — Method in class MutableBag
Removes and returns the first item in the list. MutableBag ::removeLast () — Method in class MutableBag
Removes and returns the last item in the list. S
Arr ::set () — Method in class Arr
Sets a value in a nested array or ArrayAccess
object using path syntax to set nested data. Bag ::sum () — Method in class Bag
Returns the sum of the values in this list. Bag ::slice () — Method in class Bag
Returns a bag with a slice of $length
items starting at position $offset
extracted from this bag. Bag ::sort () — Method in class Bag
Returns a bag with the values sorted. Bag ::sortBy () — Method in class Bag
Returns a bag with the values sorted based on the $iteratee
function. Bag ::sortWith () — Method in class Bag
Returns a bag with the values sorted with the $comparator
. Bag ::sortKeys () — Method in class Bag
Returns a bag with the keys sorted. Bag ::sortKeysBy () — Method in class Bag
Returns a bag with the keys sorted based on the $iteratee
function. Bag ::sortKeysWith () — Method in class Bag
Returns a bag with the keys sorted with the $comparator
. Bag ::shuffle () — Method in class Bag
Returns a bag with the items shuffled. Bag ::set () — Method in class Bag
Sets a item by key. Bag ::setPath () — Method in class Bag
Sets a value using path syntax to set nested data. MutableBag ::set () — Method in class MutableBag
Sets a value by key. MutableBag ::setPath () — Method in class MutableBag
Sets a value using path syntax to set nested data. T
Bag ::toArray () — Method in class Bag
Returns the array of items. Bag ::toArrayRecursive () — Method in class Bag
Returns the items recursively converting them to arrays. U
Bag ::unique () — Method in class Bag
Returns a bag with duplicate values removed. V
Bag ::values () — Method in class Bag
Returns a bag with all the values of the items. _
Bag ::__construct () — Method in class Bag
Constructor.