Definition at line 17 of file ISO2709.php.
◆ __construct()
| ISO2709RecordSetIterator::__construct |
( |
|
$input |
) |
|
Definition at line 19 of file ISO2709.php.
References $input, and ISO2709\RecordTerminator.
21 if( !is_resource(
$input ) )
throw new Exception(
"ISO2709RecordSetIterator requires a file resource, filename, or URL to be created");
23 $this->recordClass =
"ISO2709Record";
◆ current()
| ISO2709RecordSetIterator::current |
( |
|
) |
|
◆ key()
| ISO2709RecordSetIterator::key |
( |
|
) |
|
◆ next()
| ISO2709RecordSetIterator::next |
( |
|
) |
|
Definition at line 34 of file ISO2709.php.
References valid().
Referenced by rewind().
35 if( $this->currentRecord === null ) $this->currentRecord =
new $this->recordClass();
36 $this->currentPosition++;
37 $string = stream_get_line( $this->input, 99999, $this->RecordTerminator );
39 if( $string ===
false ) $this->
valid =
false;
40 else $this->currentRecord->loadFromString( $this->prepend . $string );
◆ rewind()
| ISO2709RecordSetIterator::rewind |
( |
|
) |
|
Definition at line 43 of file ISO2709.php.
References next().
44 if($this->currentPosition !== null)
rewind( $this->input );
45 $this->currentPosition = -1;
46 $this->currentRecord =
new $this->recordClass();
◆ valid()
| ISO2709RecordSetIterator::valid |
( |
|
) |
|
◆ $currentPosition
| ISO2709RecordSetIterator::$currentPosition |
◆ $currentRecord
| ISO2709RecordSetIterator::$currentRecord |
◆ $input
| ISO2709RecordSetIterator::$input |
|
protected |
◆ $prepend
| ISO2709RecordSetIterator::$prepend |
◆ $RecordTerminator
| ISO2709RecordSetIterator::$RecordTerminator |
◆ $valid
| ISO2709RecordSetIterator::$valid |
The documentation for this class was generated from the following file: