Skip to content

Commit

Permalink
Filter & RecursiveFilter are deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 21, 2015
1 parent 5c8e442 commit 5617d88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Iterators/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* CallbackFilterIterator for PHP < 5.4.
*
* @author David Grudl
* @deprecated use CallbackFilterIterator
*/
class Filter extends \FilterIterator
{
Expand All @@ -23,6 +24,7 @@ class Filter extends \FilterIterator

public function __construct(\Iterator $iterator, $callback)
{
trigger_error(__CLASS__ . ' is deprecated, use CallbackFilterIterator.', E_USER_WARNING);
parent::__construct($iterator);
$this->callback = Nette\Utils\Callback::check($callback);
}
Expand Down
2 changes: 2 additions & 0 deletions src/Iterators/RecursiveFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
* RecursiveCallbackFilterIterator for PHP < 5.4.
*
* @author David Grudl
* @deprecated use RecursiveCallbackFilterIterator
*/
class RecursiveFilter extends Filter implements \RecursiveIterator
{

public function __construct(\RecursiveIterator $iterator, $callback)
{
trigger_error(__CLASS__ . ' is deprecated, use RecursiveCallbackFilterIterator.', E_USER_WARNING);
parent::__construct($iterator, $callback);
}

Expand Down

0 comments on commit 5617d88

Please sign in to comment.