Documentation

FileCollectionInterface extends CollectionInterface, Selectable

Collection of objects stored into a filesystem.

Tags
template
template
extends
extends

Table of Contents

Constants

INCLUDE_FILES  = 1
INCLUDE_FOLDERS  = 2
RECURSIVE  = 4

Methods

chunk()  : array<string|int, mixed>
Split collection into chunks.
getPath()  : string
reverse()  : CollectionInterface
Reverse the order of the items.
select()  : CollectionInterface
Select items from collection.
shuffle()  : CollectionInterface
Shuffle items.
unselect()  : CollectionInterface
Un-select items from collection.

Constants

Methods

chunk()

Split collection into chunks.

public chunk(int $size) : array<string|int, mixed>
Parameters
$size : int

Size of each chunk.

Tags
phpstan-return

array<array<TKey,T>>

Return values
array<string|int, mixed>

select()

Select items from collection.

public select(array<string|int, int|string> $keys) : CollectionInterface

Collection is returned in the order of $keys given to the function.

Parameters
$keys : array<string|int, int|string>
Tags
phpstan-return

static<TKey,T>

Return values
CollectionInterface

        
On this page

Search results