2014-07-30 03:18:48 +00:00
|
|
|
<?php
|
|
|
|
|
2022-11-02 20:26:48 +00:00
|
|
|
namespace MediaWiki\Extension\Notifications\Iterator;
|
|
|
|
|
|
|
|
use IteratorDecorator;
|
|
|
|
use RecursiveIterator;
|
|
|
|
|
2014-07-30 03:18:48 +00:00
|
|
|
/**
|
|
|
|
* 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-11-02 20:26:48 +00:00
|
|
|
class NotRecursiveIterator extends IteratorDecorator implements RecursiveIterator {
|
2022-07-10 02:47:24 +00:00
|
|
|
public function hasChildren(): bool {
|
2014-07-30 03:18:48 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2022-07-10 02:47:24 +00:00
|
|
|
public function getChildren(): ?RecursiveIterator {
|
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;
|
|
|
|
}
|
|
|
|
}
|