note 110974 added to class.recursivecallbackfilteriterator

From: Date: Tue, 01 Jan 2013 23:26:47 +0000
Subject: note 110974 added to class.recursivecallbackfilteriterator
Groups: php.notes 
Request: Send a blank email to php-notes+get-192724@lists.php.net to get a copy of this message
Here is a code that may implement similar functionality in PHP 5.2 or 5.3 : <?php class RecursiveCallbackFilterIterator extends RecursiveFilterIterator { public function __construct ( RecursiveIterator $iterator, $callback ) { $this->callback = $callback; parent::__construct($iterator); } public function accept () { $callback = $this->callback; return $callback(parent::current(), parent::key(), parent::getInnerIterator()); } public function getChildren () { return new self($this->getInnerIterator()->getChildren(), $this->callback); } } ?> ---- Server IP: 69.147.83.199 Probable Submitter: 83.157.222.155 ---- Manual Page -- http://php.net/manual/en/class.recursivecallbackfilteriterator.php Edit -- https://master.php.net/note/edit/110974 Del: integrated -- https://master.php.net/note/delete/110974/integrated Del: useless -- https://master.php.net/note/delete/110974/useless Del: bad code -- https://master.php.net/note/delete/110974/bad+code Del: spam -- https://master.php.net/note/delete/110974/spam Del: non-english -- https://master.php.net/note/delete/110974/non-english Del: in docs -- https://master.php.net/note/delete/110974/in+docs Del: other reasons-- https://master.php.net/note/delete/110974 Reject -- https://master.php.net/note/reject/110974 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#192724) next »