RecursiveFilterIterator
simple
Esse commit está contido em:
+189
-129
@@ -2527,6 +2527,195 @@ class IteratorIterator implements OuterIterator {
|
||||
}
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/class.filteriterator.php )
|
||||
*
|
||||
* This abstract iterator filters out unwanted values. This class should
|
||||
* be extended to implement custom iterator filters. The
|
||||
* FilterIterator::accept() must be implemented in the subclass.
|
||||
*
|
||||
*/
|
||||
abstract class FilterIterator extends IteratorIterator {
|
||||
private $it;
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.construct.php )
|
||||
*
|
||||
* Constructs a new FilterIterator, which consists of a passed in iterator
|
||||
* with filters applied to it. WarningThis function is currently not
|
||||
* documented; only its argument list is available.
|
||||
*
|
||||
* @it mixed The iterator that is being filtered.
|
||||
*
|
||||
* @return mixed The FilterIterator.
|
||||
*/
|
||||
public function __construct(Iterator $it) {
|
||||
$this->it = $it;
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.rewind.php )
|
||||
*
|
||||
*
|
||||
* @return mixed No value is returned.
|
||||
*/
|
||||
public function rewind() {
|
||||
$this->it->rewind();
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.accept.php )
|
||||
*
|
||||
* Returns whether the current element of the iterator is acceptable
|
||||
* through this filter.
|
||||
*
|
||||
* @return mixed TRUE if the current element is acceptable, otherwise
|
||||
* FALSE.
|
||||
*/
|
||||
abstract function accept();
|
||||
|
||||
private function fetch() {
|
||||
while ($this->it->valid()) {
|
||||
if ($this->accept()) {
|
||||
return;
|
||||
}
|
||||
$this->it->next();
|
||||
}
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.next.php )
|
||||
*
|
||||
*
|
||||
* @return mixed No value is returned.
|
||||
*/
|
||||
public function next() {
|
||||
$this->it->next();
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.valid.php )
|
||||
*
|
||||
*
|
||||
* @return mixed TRUE if the current element is valid, otherwise
|
||||
* FALSE
|
||||
*/
|
||||
public function valid() {
|
||||
return $this->it->valid();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.key.php )
|
||||
*
|
||||
*
|
||||
* @return mixed The current key.
|
||||
*/
|
||||
public function key() {
|
||||
return $this->it->key();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.current.php )
|
||||
*
|
||||
*
|
||||
* @return mixed The current element value.
|
||||
*/
|
||||
public function current() {
|
||||
return $this->it->current();
|
||||
}
|
||||
|
||||
protected function __clone() {
|
||||
// disallow clone
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/filteriterator.getinneriterator.php )
|
||||
*
|
||||
*
|
||||
* @return mixed The inner iterator.
|
||||
*/
|
||||
public function getInnerIterator() {
|
||||
return $this->it;
|
||||
}
|
||||
|
||||
public function __call($func, $params) {
|
||||
return call_user_func_array(array($this->it, $func), $params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/class.recursivefilteriterator.php )
|
||||
*
|
||||
* This abstract iterator filters out unwanted values for a
|
||||
* RecursiveIterator. This class should be extended to implement custom
|
||||
* filters. The RecursiveFilterIterator::accept() must be implemented in
|
||||
* the subclass.
|
||||
*
|
||||
*/
|
||||
abstract class RecursiveFilterIterator extends FilterIterator
|
||||
implements OuterIterator, RecursiveIterator {
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/recursivefilteriterator.construct.php )
|
||||
*
|
||||
* Create a RecursiveFilterIterator from a RecursiveIterator.
|
||||
*
|
||||
* @iterator mixed The RecursiveIterator to be filtered.
|
||||
*
|
||||
* @return mixed No value is returned.
|
||||
*/
|
||||
public function __construct (RecursiveIterator $iterator) {
|
||||
return parent::__construct($iterator);
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/recursivefilteriterator.getchildren.php )
|
||||
*
|
||||
* Return the inner iterator's children contained in a
|
||||
* RecursiveFilterIterator.
|
||||
*
|
||||
* @return mixed Returns a RecursiveFilterIterator containing the
|
||||
* inner iterator's children.
|
||||
*/
|
||||
public function getChildren() {
|
||||
return $this->getInnerIterator()->getChildren();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/recursivefilteriterator.haschildren.php )
|
||||
*
|
||||
* Check whether the inner iterator's current element has children.
|
||||
*
|
||||
* @return mixed TRUE if the inner iterator has children, otherwise
|
||||
* FALSE
|
||||
*/
|
||||
public function hasChildren() {
|
||||
return $this->getInnerIterator()->hasChildren();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface DebuggerCommand {
|
||||
/**
|
||||
* Called when DebuggerClient needs to auto-complete. Inside this function,
|
||||
@@ -6872,135 +7061,6 @@ class ArrayIterator implements ArrayAccess, SeekableIterator, Countable {
|
||||
}
|
||||
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/class.filteriterator.php )
|
||||
*
|
||||
* This abstract iterator filters out unwanted values. This class should
|
||||
* be extended to implement custom iterator filters. The
|
||||
* FilterIterator::accept() must be implemented in the subclass.
|
||||
*
|
||||
*/
|
||||
abstract class FilterIterator extends IteratorIterator {
|
||||
private $it;
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.construct.php )
|
||||
*
|
||||
* Constructs a new FilterIterator, which consists of a passed in iterator
|
||||
* with filters applied to it. WarningThis function is currently not
|
||||
* documented; only its argument list is available.
|
||||
*
|
||||
* @it mixed The iterator that is being filtered.
|
||||
*
|
||||
* @return mixed The FilterIterator.
|
||||
*/
|
||||
public function __construct(Iterator $it) {
|
||||
$this->it = $it;
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.rewind.php )
|
||||
*
|
||||
*
|
||||
* @return mixed No value is returned.
|
||||
*/
|
||||
public function rewind() {
|
||||
$this->it->rewind();
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.accept.php )
|
||||
*
|
||||
* Returns whether the current element of the iterator is acceptable
|
||||
* through this filter.
|
||||
*
|
||||
* @return mixed TRUE if the current element is acceptable, otherwise
|
||||
* FALSE.
|
||||
*/
|
||||
abstract function accept();
|
||||
|
||||
private function fetch() {
|
||||
while ($this->it->valid()) {
|
||||
if ($this->accept()) {
|
||||
return;
|
||||
}
|
||||
$this->it->next();
|
||||
}
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.next.php )
|
||||
*
|
||||
*
|
||||
* @return mixed No value is returned.
|
||||
*/
|
||||
public function next() {
|
||||
$this->it->next();
|
||||
$this->fetch();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.valid.php )
|
||||
*
|
||||
*
|
||||
* @return mixed TRUE if the current element is valid, otherwise
|
||||
* FALSE
|
||||
*/
|
||||
public function valid() {
|
||||
return $this->it->valid();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.key.php )
|
||||
*
|
||||
*
|
||||
* @return mixed The current key.
|
||||
*/
|
||||
public function key() {
|
||||
return $this->it->key();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from http://php.net/manual/en/filteriterator.current.php )
|
||||
*
|
||||
*
|
||||
* @return mixed The current element value.
|
||||
*/
|
||||
public function current() {
|
||||
return $this->it->current();
|
||||
}
|
||||
|
||||
protected function __clone() {
|
||||
// disallow clone
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/filteriterator.getinneriterator.php )
|
||||
*
|
||||
*
|
||||
* @return mixed The inner iterator.
|
||||
*/
|
||||
public function getInnerIterator() {
|
||||
return $this->it;
|
||||
}
|
||||
|
||||
public function __call($func, $params) {
|
||||
return call_user_func_array(array($this->it, $func), $params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
|
||||
@@ -22,6 +22,8 @@ hphp/system/classes/spl/file_handling/SplFileObject.php
|
||||
|
||||
hphp/system/classes/spl/interfaces/OuterIterator.php
|
||||
hphp/system/classes/spl/iterators/IteratorIterator.php
|
||||
hphp/system/classes/spl/iterators/FilterIterator.php
|
||||
hphp/system/classes/spl/iterators/RecursiveFilterIterator.php
|
||||
|
||||
# If you have no inheritance relationship, go here in alphabetical order
|
||||
hphp/system/classes/DebuggerCommand.php
|
||||
@@ -45,7 +47,6 @@ hphp/system/classes/spl/datastructures/SplObjectStorage.php
|
||||
hphp/system/classes/spl/datastructures/SplPriorityQueue.php
|
||||
hphp/system/classes/spl/iterators/AppendIterator.php
|
||||
hphp/system/classes/spl/iterators/ArrayIterator.php
|
||||
hphp/system/classes/spl/iterators/FilterIterator.php
|
||||
hphp/system/classes/spl/iterators/RecursiveIteratorIterator.php
|
||||
hphp/system/classes/spl/miscellaneous/ArrayObject.php
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/class.recursivefilteriterator.php )
|
||||
*
|
||||
* This abstract iterator filters out unwanted values for a
|
||||
* RecursiveIterator. This class should be extended to implement custom
|
||||
* filters. The RecursiveFilterIterator::accept() must be implemented in
|
||||
* the subclass.
|
||||
*
|
||||
*/
|
||||
abstract class RecursiveFilterIterator extends FilterIterator
|
||||
implements OuterIterator, RecursiveIterator {
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/recursivefilteriterator.construct.php )
|
||||
*
|
||||
* Create a RecursiveFilterIterator from a RecursiveIterator.
|
||||
*
|
||||
* @iterator mixed The RecursiveIterator to be filtered.
|
||||
*
|
||||
* @return mixed No value is returned.
|
||||
*/
|
||||
public function __construct (RecursiveIterator $iterator) {
|
||||
return parent::__construct($iterator);
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/recursivefilteriterator.getchildren.php )
|
||||
*
|
||||
* Return the inner iterator's children contained in a
|
||||
* RecursiveFilterIterator.
|
||||
*
|
||||
* @return mixed Returns a RecursiveFilterIterator containing the
|
||||
* inner iterator's children.
|
||||
*/
|
||||
public function getChildren() {
|
||||
return $this->getInnerIterator()->getChildren();
|
||||
}
|
||||
|
||||
// This doc comment block generated by idl/sysdoc.php
|
||||
/**
|
||||
* ( excerpt from
|
||||
* http://php.net/manual/en/recursivefilteriterator.haschildren.php )
|
||||
*
|
||||
* Check whether the inner iterator's current element has children.
|
||||
*
|
||||
* @return mixed TRUE if the inner iterator has children, otherwise
|
||||
* FALSE
|
||||
*/
|
||||
public function hasChildren() {
|
||||
return $this->getInnerIterator()->hasChildren();
|
||||
}
|
||||
|
||||
}
|
||||
Referência em uma Nova Issue
Bloquear um usuário