More tests, filtering iterator, cleanup
This commit is contained in:
36
README.md
36
README.md
@ -45,3 +45,39 @@ foreach ($reader as $row) {
|
||||
// row is an array
|
||||
}
|
||||
```
|
||||
|
||||
# Documentation
|
||||
|
||||
## DatasetManager
|
||||
|
||||
The `DatasetManager` will automatically locate and load datasets on startup.
|
||||
|
||||
```
|
||||
getDataset(string $identifier): Dataset
|
||||
Return a Dataset object, or throw exception on error
|
||||
openDataset(string $identifer): Iterator
|
||||
Return a reader for a Dataset, same as getDataset()->open()
|
||||
getAvailableDatasets(): array
|
||||
Returns the Dataset objects for all datasets found
|
||||
```
|
||||
|
||||
## Dataset
|
||||
|
||||
```
|
||||
open(): Iterator
|
||||
Return an iterator to iterate over the data
|
||||
filter(array|callable $condition): Iterator
|
||||
Return an iterator that only returns rows matching filter
|
||||
getIdentifier(): string
|
||||
Return the dataset identifier (vendor/package#dataset)
|
||||
getVersion(): string
|
||||
Return the package version of the dataset
|
||||
getPackageName(): string
|
||||
Return the package name (vendor/package)
|
||||
getDatasetName(): string
|
||||
Return the dataset name (dataset)
|
||||
getLicense(): ?string
|
||||
Return the license for the dataset
|
||||
getComment(): ?string
|
||||
Return the dataset comment
|
||||
```
|
Reference in New Issue
Block a user