\League\CsvStatement

Criteria to filter a {@link Reader} object.

Summary

Methods
Properties
Constants
where()
orderBy()
offset()
limit()
process()
No public properties found
No constants found
filter()
buildOrderBy()
$where
$order_by
$offset
$limit
N/A
No private methods found
No private properties found
N/A

Properties

$where

$where : array<mixed,callable>

Callables to filter the iterator.

Type

array<mixed,callable>

$order_by

$order_by : array<mixed,callable>

Callables to sort the iterator.

Type

array<mixed,callable>

$offset

$offset : integer

iterator Offset.

Type

integer

$limit

$limit : integer

iterator maximum length.

Type

integer

Methods

where()

where(callable  $callable) 

Set the Iterator filter method.

Parameters

callable $callable

orderBy()

orderBy(callable  $callable) 

Set an Iterator sorting callable function.

Parameters

callable $callable

offset()

offset(\League\Csv\int  $offset) 

Set LimitIterator Offset.

Parameters

\League\Csv\int $offset

Throws

\League\Csv\Exception

if the offset is lesser than 0

limit()

limit(\League\Csv\int  $limit) 

Set LimitIterator Count.

Parameters

\League\Csv\int $limit

Throws

\League\Csv\Exception

if the limit is lesser than -1

process()

process(\League\Csv\Reader  $csv, array<mixed,string>  $header = array()) 

Execute the prepared Statement on the {@link Reader} object.

Parameters

\League\Csv\Reader $csv
array<mixed,string> $header

an optional header to use instead of the CSV document header

filter()

filter(\Iterator  $iterator, callable  $callable) 

Filters elements of an Iterator using a callback function.

Parameters

\Iterator $iterator
callable $callable

buildOrderBy()

buildOrderBy(\Iterator  $iterator) 

Sort the Iterator.

Parameters

\Iterator $iterator