Source of file Listable.php
Size: 2,180 Bytes - Last Modified: 2021-12-23T10:02:54+00:00
/var/www/docs.ssmods.com/process/src/src/Traits/Listable.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 | <?php namespace Marcz\Search\Traits; trait Listable { /** * Returns all the items in the list in an array. * * @return array */ public function toArray() { } /** * Returns the contents of the list as an array of maps. * * @return array */ public function toNestedArray() { } /** * Adds an item to the list, making no guarantees about where it will * appear. * * @param mixed $item */ public function add($item) { } /** * Removes an item from the list. * * @param mixed $item */ public function remove($item) { } /** * Returns the first item in the list. * * @return mixed */ public function first() { } /** * Returns the last item in the list. * * @return mixed */ public function last() { } /** * Returns a map of a key field to a value field of all the items in the * list. * * @param string $keyfield * @param string $titlefield * @return Map */ public function map($keyfield = 'ID', $titlefield = 'Title') { } /** * Returns the first item in the list where the key field is equal to the * value. * * @param string $key * @param mixed $value * @return mixed */ public function find($key, $value) { } /** * Returns an array of a single field value for all items in the list. * * @param string $colName * @return array */ public function column($colName = 'ID') { } /** * Walks the list using the specified callback * * @param callable $callback * @return $this */ public function each($callback) { } /** * Return the number of items in this DataList * * @return int */ public function count() { } public function offsetExists($offset) { } public function offsetGet($offset) { } public function offsetSet($offset, $value) { } public function offsetUnset($offset) { } } |