mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-15 03:35:01 +00:00
34 lines
597 B
PHP
34 lines
597 B
PHP
|
<?php
|
||
|
|
||
|
/**
|
||
|
* Allows extending classes to decorate an Iterator with
|
||
|
* reduced boilerplate.
|
||
|
*/
|
||
|
abstract class EchoIteratorDecorator implements Iterator {
|
||
|
protected $iterator;
|
||
|
|
||
|
public function __construct( Iterator $iterator ) {
|
||
|
$this->iterator = $iterator;
|
||
|
}
|
||
|
|
||
|
public function current() {
|
||
|
return $this->iterator->current();
|
||
|
}
|
||
|
|
||
|
public function key() {
|
||
|
return $this->iterator->key();
|
||
|
}
|
||
|
|
||
|
public function next() {
|
||
|
return $this->iterator->next();
|
||
|
}
|
||
|
|
||
|
public function rewind() {
|
||
|
return $this->iterator->rewind();
|
||
|
}
|
||
|
|
||
|
public function valid() {
|
||
|
return $this->iterator->valid();
|
||
|
}
|
||
|
}
|