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:
18: public function __construct(\RecursiveIterator $iterator, $callback)
19: {
20: trigger_error(__CLASS__ . ' is deprecated, use RecursiveCallbackFilterIterator.', E_USER_WARNING);
21: parent::__construct($iterator, $callback);
22: }
23:
24:
25: public function hasChildren()
26: {
27: return $this->getInnerIterator()->hasChildren();
28: }
29:
30:
31: public function getChildren()
32: {
33: return new static($this->getInnerIterator()->getChildren(), $this->callback);
34: }
35:
36: }
37: