mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 07:14:35 +02:00
FileReader: Mimic cursor capability
This commit is contained in:
parent
ae30a62055
commit
5d50eabb44
@ -4,6 +4,7 @@
|
|||||||
namespace Icinga\Protocol\File;
|
namespace Icinga\Protocol\File;
|
||||||
|
|
||||||
use Countable;
|
use Countable;
|
||||||
|
use ArrayIterator;
|
||||||
use Icinga\Data\Selectable;
|
use Icinga\Data\Selectable;
|
||||||
use Icinga\Data\ConfigObject;
|
use Icinga\Data\ConfigObject;
|
||||||
|
|
||||||
@ -71,6 +72,18 @@ class FileReader implements Selectable, Countable
|
|||||||
return new FileQuery($this);
|
return new FileQuery($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch and return all rows of the given query's result set using an iterator
|
||||||
|
*
|
||||||
|
* @param FileQuery $query
|
||||||
|
*
|
||||||
|
* @return ArrayIterator
|
||||||
|
*/
|
||||||
|
public function query(FileQuery $query)
|
||||||
|
{
|
||||||
|
return new ArrayIterator($this->fetchAll($query));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the number of available valid lines.
|
* Return the number of available valid lines.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user