More tests, filtering iterator, cleanup
This commit is contained in:
@ -2,6 +2,8 @@
|
||||
|
||||
namespace NoccyLabs\Dataset;
|
||||
|
||||
use Iterator;
|
||||
|
||||
/**
|
||||
* DatasetManager is the central class of noccylabs/dataset.
|
||||
*
|
||||
@ -36,11 +38,11 @@ class DatasetManager
|
||||
* Directly return a reader for a specific dataset.
|
||||
*
|
||||
* @param string $identifier The dataset identifier
|
||||
* @return ReaderInterface A reader for the data
|
||||
* @return Iterator A reader for the data
|
||||
* @throws InvalidDatasetException if the dataset can not be opened
|
||||
* @throws UnknownDatasetException if the dataset does not exist
|
||||
*/
|
||||
public function openDataset(string $identifier): ReaderInterface
|
||||
public function openDataset(string $identifier): Iterator
|
||||
{
|
||||
return $this->getDataset($identifier)->open();
|
||||
}
|
||||
@ -157,6 +159,11 @@ class DatasetManager
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a dataset
|
||||
*
|
||||
*
|
||||
*/
|
||||
public function registerDataset(Dataset $dataset)
|
||||
{
|
||||
$id = $dataset->getIdentifier();
|
||||
|
Reference in New Issue
Block a user