Documentation

FileCollection extends AbstractFileCollection

Collection of objects stored into a filesystem.

Tags
extends

Table of Contents

Properties

$collection  : mixed
$createObjectFunction  : callable
$filterFunction  : callable|null
$flags  : int
$iterator  : RecursiveDirectoryIterator|RecursiveUniformResourceIterator
$nestingLimit  : int
$path  : string

Methods

__construct()  : mixed
addFilter()  : $this
chunk()  : array<string|int, mixed>
Split collection into chunks.
getFlags()  : int
getNestingLimit()  : int
getPath()  : string
jsonSerialize()  : array<string|int, mixed>
matching()  : ArrayCollection
reverse()  : CollectionInterface
Reverse the order of the items.
select()  : CollectionInterface
Select items from collection.
setFilter()  : $this
setNestingLimit()  : $this
setObjectBuilder()  : $this
shuffle()  : CollectionInterface
Shuffle items.
unselect()  : CollectionInterface
Un-select items from collection.
createObject()  : object
doInitialize()  : mixed
{@inheritDoc}
doInitializeByIterator()  : array<string|int, mixed>
doInitializeChildren()  : array<string|int, mixed>
setIterator()  : void

Properties

$collection

protected mixed $collection
Tags
par

ArrayCollection

phpstan-var

ArrayCollection<TKey,T>

Methods

__construct()

public __construct(string $path[, int $flags = null ]) : mixed
Parameters
$path : string
$flags : int = null

addFilter()

public addFilter(callable $filterFunction) : $this
Parameters
$filterFunction : callable
Return values
$this

chunk()

Split collection into chunks.

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

Size of each chunk.

Return values
array<string|int, mixed>

getNestingLimit()

public getNestingLimit() : int
Return values
int

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Attributes
#[ReturnTypeWillChange]
Return values
array<string|int, mixed>

setFilter()

public setFilter([callable|null $filterFunction = null ]) : $this
Parameters
$filterFunction : callable|null = null
Return values
$this

setNestingLimit()

public setNestingLimit([int $limit = 99 ]) : $this
Parameters
$limit : int = 99
Return values
$this

setObjectBuilder()

public setObjectBuilder([callable|null $objectFunction = null ]) : $this
Parameters
$objectFunction : callable|null = null
Return values
$this

createObject()

protected createObject(RecursiveDirectoryIterator $file) : object
Parameters
$file : RecursiveDirectoryIterator
Return values
object

doInitializeByIterator()

protected doInitializeByIterator(SeekableIterator $iterator, int $nestingLimit) : array<string|int, mixed>
Parameters
$iterator : SeekableIterator
$nestingLimit : int
Tags
phpstan-param

SeekableIterator<int,T> $iterator

Return values
array<string|int, mixed>

doInitializeChildren()

protected doInitializeChildren(array<string|int, mixed> $children, int $nestingLimit) : array<string|int, mixed>
Parameters
$children : array<string|int, mixed>
$nestingLimit : int
Return values
array<string|int, mixed>

        
On this page

Search results