- \Somnambulist\Components\Collection\Behaviours\Mutate\AppendOnlyUniqueValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\RemoveValue
- \Somnambulist\Components\Collection\Behaviours\Mutate\Clear
- \Somnambulist\Components\Collection\Behaviours\Mutate\ShuffleNewCollection
- \Somnambulist\Components\Collection\Behaviours\Mutate\MergeValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\CombineOnlyUniqueValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\Shift
- \Somnambulist\Components\Collection\Behaviours\Mutate\Pad
- \Somnambulist\Components\Collection\Behaviours\Mutate\AppendValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\ReplaceValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\Fill
- \Somnambulist\Components\Collection\Behaviours\Mutate\Shuffle
- \Somnambulist\Components\Collection\Behaviours\Mutate\Flip
- \Somnambulist\Components\Collection\Behaviours\Mutate\SetKeyValue
- \Somnambulist\Components\Collection\Behaviours\Mutate\Reverse
- \Somnambulist\Components\Collection\Behaviours\Mutate\Pop
- \Somnambulist\Components\Collection\Behaviours\Mutate\RemapKeys
- \Somnambulist\Components\Collection\Behaviours\Mutate\MergeOnlyUniqueValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\UnionValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\CombineValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\PrependOnlyUniqueValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\PrependValues
- \Somnambulist\Components\Collection\Behaviours\Mutate\UnsetKey
- \Somnambulist\Components\Collection\Behaviours\Mutate\UnionOnlyUniqueValues
Trait AppendOnlyUniqueValues
| Visibility | Function |
|---|---|
| public | add(\mixed $value) : \Somnambulist\Components\Collection\Collection/static Append the value to the collection |
| public | append(mixed $value) : \Somnambulist\Components\Collection\Collection/static Add elements to the end of the collection |
| public | concat(\iterable $items) : \Somnambulist\Components\Collection\Collection/static Push all of the given items onto the collection. |
| public | push(mixed $value) : \Somnambulist\Components\Collection\Collection/static Alias of append |
Trait RemoveValue
| Visibility | Function |
|---|---|
| public | remove(\mixed $value) : \Somnambulist\Components\Collection\Collection/static Remove the value from the collection |
Trait Clear
| Visibility | Function |
|---|---|
| public | clear() : \Somnambulist\Components\Collection\Collection/static Clear all elements from the collection |
| public | reset() : \Somnambulist\Components\Collection\Collection/static Alias of clear |
Trait ShuffleNewCollection
| Visibility | Function |
|---|---|
| public | shuffle() : \Somnambulist\Components\Collection\Collection/static Shuffle the items in the collection; returning a new collection. |
Trait MergeValues
| Visibility | Function |
|---|---|
| public | merge(\mixed $value) : \Somnambulist\Components\Collection\Collection/static Merges the supplied array into the current Collection Note: should only be used with Collections of the same data, may cause strange results otherwise. This method will re-index keys and overwrite existing values. If you wish to preserve keys and values see {@link append}. |
Trait CombineOnlyUniqueValues
| Visibility | Function |
|---|---|
| public | combine(\mixed $items) : \Somnambulist\Components\Collection\Collection/static Create a collection by using this collection for keys and another for its values |
Trait Shift
| Visibility | Function |
|---|---|
| public | shift() : mixed Remove the first value from the collection |
Trait Pad
| Visibility | Function |
|---|---|
| public | pad(integer/\int $size, \mixed $value) : \Somnambulist\Components\Collection\Collection/static Pads the Collection to size using value as the value of the new elements |
Trait AppendValues
| Visibility | Function |
|---|---|
| public | add(\mixed $value) : \Somnambulist\Components\Collection\Collection/static Append the value to the collection |
| public | append(mixed $value) : \Somnambulist\Components\Collection\Collection/static Add elements to the end of the collection |
| public | concat(\iterable $items) : \Somnambulist\Components\Collection\Collection/static Push all of the given items onto the collection. |
| public | push(mixed $value) : \Somnambulist\Components\Collection\Collection/static Alias of append |
Trait ReplaceValues
| Visibility | Function |
|---|---|
| public | replace(mixed $items) : \Somnambulist\Components\Collection\Collection/static |
| public | replaceRecursively(mixed $items) : \Somnambulist\Components\Collection\Collection/static |
Trait Fill
| Visibility | Function |
|---|---|
| public | fill(\int $start, \int $count, \mixed $value) : \Somnambulist\Components\Collection\Collection/static Fill an array with values beginning at index defined by start for count members Start can be a negative number. Count can be zero or more. |
| public | fillKeysWith(\mixed $value) : \Somnambulist\Components\Collection\Collection/static For all values in the current Collection, use as a key and assign $value to them This should only be used with scalar values that can be used as array keys. A new Collection is returned with all previous values as keys, assigned the value. |
Trait Shuffle
| Visibility | Function |
|---|---|
| public | shuffle() : \Somnambulist\Components\Collection\Collection/static Shuffle the items in the collection; does NOT return a new collection. |
Trait Flip
| Visibility | Function |
|---|---|
| public | flip() : \Somnambulist\Components\Collection\Collection/static Exchange all values for keys and return new Collection Note: this should only be used with elements that can be used as valid PHP array keys. |
Trait SetKeyValue
| Visibility | Function |
|---|---|
| public | set(int/string/\int $key, \mixed $value) : \Somnambulist\Components\Collection\Collection/static Add the value at the specified key/offset to the collection |
Trait Reverse
| Visibility | Function |
|---|---|
| public | reverse() : \Somnambulist\Components\Collection\Collection/static Reverses the data in the Collection maintaining any keys |
Trait Pop
| Visibility | Function |
|---|---|
| public | pop() : mixed Pops the element off the end of the Collection |
Trait RemapKeys
| Visibility | Function |
|---|---|
| public | remapKeys(array $map) : \Somnambulist\Components\Collection\Collection/static From the provided map of key -> new_key; change the current key to new_key The previous key is unset from the collection. |
Trait MergeOnlyUniqueValues
| Visibility | Function |
|---|---|
| public | merge(\mixed $value) : \Somnambulist\Components\Collection\Collection/static Merges the supplied array into the current Collection Note: should only be used with Collections of the same data, may cause strange results otherwise. This method will re-index keys and overwrite existing values. If you wish to preserve keys and values see {@link append}. |
Trait UnionValues
| Visibility | Function |
|---|---|
| public | union(\mixed $items) : \Somnambulist\Components\Collection\Collection/static Union the collection with the given items. |
Trait CombineValues
| Visibility | Function |
|---|---|
| public | combine(\mixed $items) : \Somnambulist\Components\Collection\Collection/static Create a collection by using this collection for keys and another for its values |
Trait PrependOnlyUniqueValues
| Visibility | Function |
|---|---|
| public | prepend(mixed $value) : \Somnambulist\Components\Collection\Collection/static Prepends the elements to the beginning of the collection |
Trait PrependValues
| Visibility | Function |
|---|---|
| public | prepend(mixed $value) : \Somnambulist\Components\Collection\Collection/static Prepends the elements to the beginning of the collection |
Trait UnsetKey
| Visibility | Function |
|---|---|
| public | unset(int/string/\int $key) : \Somnambulist\Components\Collection\Collection/static Remove the key from the collection |
Trait UnionOnlyUniqueValues
| Visibility | Function |
|---|---|
| public | union(\mixed $items) : \Somnambulist\Components\Collection\Collection/static Union the collection with the given items. |