| 1 | <?php |
||
| 10 | class XmlReader implements CountableReaderInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var \Iterator |
||
| 14 | */ |
||
| 15 | protected $iterableResult; |
||
| 16 | |||
| 17 | private $filename; |
||
| 18 | private $xpath; |
||
| 19 | |||
| 20 | 3 | public function __construct(\SplFileObject $file, $xpath = null) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritdoc} |
||
| 33 | */ |
||
| 34 | 2 | public function getFields() |
|
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | 3 | public function current() |
|
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritdoc} |
||
| 53 | */ |
||
| 54 | 3 | public function next() |
|
| 58 | |||
| 59 | /** |
||
| 60 | * {@inheritdoc} |
||
| 61 | */ |
||
| 62 | 2 | public function key() |
|
| 66 | |||
| 67 | /** |
||
| 68 | * {@inheritdoc} |
||
| 69 | */ |
||
| 70 | 3 | public function valid() |
|
| 74 | |||
| 75 | /** |
||
| 76 | * {@inheritdoc} |
||
| 77 | */ |
||
| 78 | 3 | public function rewind() |
|
| 90 | |||
| 91 | /** |
||
| 92 | * {@inheritdoc} |
||
| 93 | */ |
||
| 94 | 2 | public function count() |
|
| 102 | } |
||
| 103 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: