<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Calls the callback with the current value, the current key and the inner iterator as arguments</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.callbackfilteriterator.html">CallbackFilterIterator</a></div> <div class="next" style="text-align: right; float: right;"><a href="callbackfilteriterator.construct.html">CallbackFilterIterator::__construct</a></div> <div class="up"><a href="class.callbackfilteriterator.html">CallbackFilterIterator</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="callbackfilteriterator.accept" class="refentry"> <div class="refnamediv"> <h1 class="refname">CallbackFilterIterator::accept</h1> <p class="verinfo">(PHP 5 >= 5.4.0)</p><p class="refpurpose"><span class="refname">CallbackFilterIterator::accept</span> — <span class="dc-title">Calls the callback with the current value, the current key and the inner iterator as arguments</span></p> </div> <div class="refsect1 description" id="refsect1-callbackfilteriterator.accept-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><strong>CallbackFilterIterator::accept</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> This method calls the callback with the current value, current key and the inner iterator. </p> <p class="para"> The callback is expected to return <strong><code>TRUE</code></strong> if the current item is to be accepted, or <strong><code>FALSE</code></strong> otherwise. </p> </div> <div class="refsect1 parameters" id="refsect1-callbackfilteriterator.accept-parameters"> <h3 class="title">Parameters</h3> <p class="para">This function has no parameters.</p> </div> <div class="refsect1 returnvalues" id="refsect1-callbackfilteriterator.accept-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> to accept the current item, or <strong><code>FALSE</code></strong> otherwise. </p> </div> <div class="refsect1 seealso" id="refsect1-callbackfilteriterator.accept-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"><a href="class.callbackfilteriterator.html#callbackfilteriterator.examples" class="link">CallbackFilterIterator Examples</a></li> <li class="member"> <span class="methodname"><a href="callbackfilteriterator.construct.html" class="methodname" rel="rdfs-seeAlso">CallbackFilterIterator::__construct()</a> - Create a filtered iterator from another iterator</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="class.callbackfilteriterator.html">CallbackFilterIterator</a></div> <div class="next" style="text-align: right; float: right;"><a href="callbackfilteriterator.construct.html">CallbackFilterIterator::__construct</a></div> <div class="up"><a href="class.callbackfilteriterator.html">CallbackFilterIterator</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>