1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6: */
7:
8: namespace Nette\Iterators;
9:
10:
11: /**
12: * RecursiveCallbackFilterIterator for PHP < 5.4.
13: * @deprecated use RecursiveCallbackFilterIterator
14: */
15: class RecursiveFilter extends Filter implements \RecursiveIterator
16: {
17: public function __construct(\RecursiveIterator $iterator, $callback)
18: {
19: trigger_error(__CLASS__ . ' is deprecated, use RecursiveCallbackFilterIterator.', E_USER_WARNING);
20: parent::__construct($iterator, $callback);
21: }
22:
23:
24: public function hasChildren()
25: {
26: return $this->getInnerIterator()->hasChildren();
27: }
28:
29:
30: public function getChildren()
31: {
32: return new static($this->getInnerIterator()->getChildren(), $this->callback);
33: }
34: }
35: