Marcz\Search\Traits\Listable
Synopsis
trait Listable
{
- // methods
- public array toArray()
- public array toNestedArray()
- public void add()
- public void remove()
- public mixed first()
- public mixed last()
- public Map map()
- public mixed find()
- public array column()
- public $this each()
- public int count()
- public void offsetExists()
- public void offsetGet()
- public void offsetSet()
- public void offsetUnset()
Methods
public
- add() — Adds an item to the list, making no guarantees about where it will appear.
- column() — Returns an array of a single field value for all items in the list.
- count() — Return the number of items in this DataList
- each() — Walks the list using the specified callback
- find() — Returns the first item in the list where the key field is equal to the value.
- first() — Returns the first item in the list.
- last() — Returns the last item in the list.
- map() — Returns a map of a key field to a value field of all the items in the list.
- offsetExists()
- offsetGet()
- offsetSet()
- offsetUnset()
- remove() — Removes an item from the list.
- toArray() — Returns all the items in the list in an array.
- toNestedArray() — Returns the contents of the list as an array of maps.