PHP Class Jyxo\Spl\CountableLimitIterator

Author: Jakub Tománek
Inheritance: extends LimitIterator, implements Countable
Show file Open project: jyxo/php

Public Methods

Method Description
__construct ( Iterator $iterator, integer $offset, integer $count, integer $mode = self::MODE_PASS ) Constructor.
count ( ) : integer Returns number of items based on result counting mode (all inner or final count after applying limit).

Method Details

__construct() public method

Constructor.
public __construct ( Iterator $iterator, integer $offset, integer $count, integer $mode = self::MODE_PASS )
$iterator Iterator Source data
$offset integer Offset (Optional)
$count integer Maximum item count (Optional)
$mode integer Result counting mode

count() public method

Returns number of items based on result counting mode (all inner or final count after applying limit).
public count ( ) : integer
return integer