This is a set of classes written for Echo to simplify writing maintenance scripts that iterate over an entire table and update some of those rows. This has shown to be reusable elsewhere, especially the BatchRowIterator class and will be useful to have generally avilable in core. The Echo classes are all prefixed with the Echo name so there wont be any conflict is both are installed. Change-Id: I64c1751106caf34f41af799dbaf8794115537f06
35 lines
1.2 KiB
PHP
35 lines
1.2 KiB
PHP
<?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.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
*
|
|
* @file
|
|
* @ingroup Maintenance
|
|
*/
|
|
class NotRecursiveIterator extends IteratorDecorator implements RecursiveIterator {
|
|
public function hasChildren() {
|
|
return false;
|
|
}
|
|
|
|
public function getChildren() {
|
|
return null;
|
|
}
|
|
}
|