| 1 | <?php |
||
| 8 | class CurrentCachedIterator extends IteratorIterator |
||
| 9 | { |
||
| 10 | protected $cachedCurrent; |
||
| 11 | protected $currentUpToDate; |
||
| 12 | protected $cachedValid; |
||
| 13 | protected $validUpToDate; |
||
| 14 | |||
| 15 | public function __construct($innerIterator) |
||
| 21 | |||
| 22 | public function invalidateCache() |
||
| 27 | |||
| 28 | public function rewind() |
||
| 33 | |||
| 34 | public function uncachedCurrent() |
||
| 38 | |||
| 39 | public function current() |
||
| 47 | |||
| 48 | public function next() |
||
| 53 | |||
| 54 | public function uncachedValid() |
||
| 58 | |||
| 59 | public function valid() |
||
| 67 | } |
||
| 68 | |||
| 69 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.