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


Parameters

$data

(array)(Required)

$callback

(callable)(Required)Callback to be called on each value


Top ↑

Source

File: wp-includes/Requests/Utility/FilteredIterator.php

	public function __construct($data, $callback) {
		parent::__construct($data);

		$this->callback = $callback;
	}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.