2014-07-30 03:18:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Wraps a non-recursive iterator with methods to be recursive
|
|
|
|
* without children.
|
|
|
|
*
|
|
|
|
* Alternatively wraps a recursive iterator to prevent recursing deeper
|
|
|
|
* than the wrapped iterator.
|
|
|
|
*/
|
2022-05-02 10:39:24 +00:00
|
|
|
class EchoNotRecursiveIterator extends IteratorDecorator implements RecursiveIterator {
|
2014-07-30 03:18:48 +00:00
|
|
|
public function hasChildren() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getChildren() {
|
2020-12-10 05:45:51 +00:00
|
|
|
// @phan-suppress-next-line PhanTypeMismatchReturnProbablyReal Never called
|
2014-07-30 03:18:48 +00:00
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|