Class TablemanCollection
Responsiblity to make Collection support Tableman. Adds a Collection
compatibility(kind of) layer for Tableman.
-
Illuminate\Support\Collection
-
mechanicious\Tableman\TablemanCollection
Methods summary
public static
mechanicious\Tableman\Tableman
|
#
make( mechanicious\Columnizer\ColumnBag $columns )
Create a whole new Tableman instance. Extensions will be purged.
Create a whole new Tableman instance. Extensions will be purged.
Returns
|
public
Illuminate\Support\Collection
|
#
collapse( )
Collapse the collection items into a single array.
Collapse the collection items into a single array.
Returns
Illuminate\Support\Collection
|
public
array
|
#
diff( Illuminate\Support\Collection|Illuminate\Support\Contracts\ArrayableInterface|array $items )
Returns what the object running this method has but what $items doesn't have.
Using row-set comparison.
Returns what the object running this method has but what $items doesn't have.
Using row-set comparison.
Parameters
- $items
Illuminate\Support\Collection|Illuminate\Support\Contracts\ArrayableInterface|array $items
Returns
array
|
public
mechanicious\Tableman\Tableman
|
#
each( closure $callback )
Execute a callback over each item. Alias of Tableman::eachColumn
Execute a callback over each item. Alias of Tableman::eachColumn
Parameters
- $callback
closure $callback
Returns
|
public
Illuminate\Support\Collection
|
#
fetch( string $key )
Fetch a nested element of the collection.
Fetch a nested element of the collection.
Parameters
Returns
Illuminate\Support\Collection
|
public
Illuminate\Support\Collection
|
#
filter( Closure $callback )
Run a filter over each of the items.
Run a filter over each of the items.
Parameters
Returns
Illuminate\Support\Collection
|
public
array
|
#
flatten( )
Get a flattened array of the items in the collection.
Get a flattened array of the items in the collection.
Returns
array
|
public
Illuminate\Support\Collection
|
#
groupBy( callable|string $groupBy )
Group an associative array by a field or Closure value.
Group an associative array by a field or Closure value.
Parameters
- $groupBy
callable|string $groupBy
Returns
Illuminate\Support\Collection
|
public
string
|
#
implode( string $header, string $glue = ", " )
Concatenate values of a given header as a string.
Concatenate values of a given header as a string.
Parameters
- $header
string $header
- $glue
string $glue
Returns
string
|
protected
array
|
#
getArrayableItems( Illuminate\Support\Collection|Illuminate\Support\Contracts\ArrayableInterface|array $items )
Results array of items from Collection or ArrayableInterface.
Results array of items from Collection or ArrayableInterface.
Parameters
- $items
Illuminate\Support\Collection|Illuminate\Support\Contracts\ArrayableInterface|array $items
Returns
array
|