Requests_Utility_FilteredIterator::__construct() WordPress Method
The Requests_Utility_FilteredIterator::__construct() is a utility method used to filter an iterator. It is useful when you need to filter an iterator based on a certain criteria. For example, you may want to filter an iterator based on a certain value, or you may want to filter an iterator based on a certain key. This method can be used to filter an iterator based on any criteria you specify.
Requests_Utility_FilteredIterator::__construct( array $data, callable $callback ) #
Create a new iterator
Contents
Parameters
- $data
(array)(Required)
- $callback
(callable)(Required)Callback to be called on each value
Source
File: wp-includes/Requests/Utility/FilteredIterator.php
public function __construct($data, $callback) { parent::__construct($data); $this->callback = $callback; }
Expand full source codeCollapse full source codeView on TracView on GitHub