public function __construct($seq, $aSeq) { $iterator = null; $itAppend = new AppendIterator(); if (!is_null($seq)) { $iterator = Sloth::iter($seq); $itAppend->append($iterator); } foreach ($aSeq as $mSeq) { $itAppend->append(Sloth::iter($mSeq)); } $this->iterator = $itAppend; }
public function __construct($seq, $offset = 0, $count = -1) { $iterator = Sloth::iter($seq); $itLimit = new LimitIterator($iterator, $offset, $count); $this->iterator = $itLimit; }
public function __construct($seq) { $itNoRewind = new NoRewindIterator(Sloth::iter($seq)); $this->iterator = $itNoRewind; }
function iter($fst, $fn = null) { return Sloth::iter($fst, $fn); }
public function getIterator() { return Sloth::iter(new ArrayIterator($this->_data)); }
static function scanDirIter($path, $order = 0, $sort = 'name', $context = null) { $files = self::scandir($path, $order, $sort, $context); return Sloth::iter($files); }
public function __construct($seq, $callback) { $iterator = Sloth::iter($seq); $itFilter = new Sloth_CallbackFilterIterator($iterator, $callback); $this->iterator = $itFilter; }
public function __construct($seq) { $iterator = Sloth::iter($seq); $itInfin = new InfiniteIterator($iterator); $this->iterator = $itInfin; }
function iter($sql, $params = null, $strict = null) { $strict = is_null($strict) ? $this->strict() : $strict; list($sql, $params) = $this->prepareSql($sql, $params); $this->log($sql, $params); return Sloth::iter(Gongo_Locator::get($this->iteratorClass(), $this->pdo(), $sql, $params, PDO::FETCH_ASSOC, $strict)); }
function parseFileIter($path) { return Sloth::iter(new SplFileObject($path))->map(array($this, 'parseLine')); }