EntityIdReader reads entity IDs from a file, one per line.
More...
EntityIdReader reads entity IDs from a file, one per line.
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
- Parameters
-
LineReader | $reader | |
EntityIdParser | $parser | |
null | string | $entityType | The desired entity type, or null for any type. |
◆ dispose()
Wikibase\Repo\IO\EntityIdReader::dispose |
( |
| ) |
|
Closes the underlying input stream.
◆ fetchIds()
Wikibase\Repo\IO\EntityIdReader::fetchIds |
( |
|
$limit | ) |
|
Fetches the next batch of IDs.
Calling this has the side effect of advancing the internal state of the page, typically implemented by some underlying resource such as a file pointer or a database connection.
- Note
- After some finite number of calls, this method should eventually return an empty list of IDs, indicating that no more IDs are available.
- Parameters
-
int | $limit | The maximum number of IDs to return. |
- Returns
- EntityId[] A list of EntityIds matching the given parameters. Will be empty if there are no more entities to list from the given offset.
Implements Wikibase\DataModel\Services\EntityId\EntityIdPager.
◆ getExceptionHandler()
Wikibase\Repo\IO\EntityIdReader::getExceptionHandler |
( |
| ) |
|
◆ lineToId()
Wikibase\Repo\IO\EntityIdReader::lineToId |
( |
|
$line | ) |
|
|
protected |
- Parameters
-
- Returns
- EntityId|null
◆ next()
Wikibase\Repo\IO\EntityIdReader::next |
( |
| ) |
|
|
protected |
Returns the next ID (or null if there are no more ids).
- Returns
- EntityId|null
◆ setExceptionHandler()
Wikibase\Repo\IO\EntityIdReader::setExceptionHandler |
( |
ExceptionHandler |
$exceptionHandler | ) |
|
◆ $entityType
Wikibase\Repo\IO\EntityIdReader::$entityType |
|
private |
◆ $exceptionHandler
Wikibase\Repo\IO\EntityIdReader::$exceptionHandler |
|
private |
◆ $parser
Wikibase\Repo\IO\EntityIdReader::$parser |
|
private |
◆ $reader
Wikibase\Repo\IO\EntityIdReader::$reader |
|
private |
The documentation for this class was generated from the following file: