QueryPath\DOMQuery::eachLambda PHP Method

eachLambda() public method

An each() iterator that takes a lambda function.
See also: each()
See also: filterLambda()
See also: filterCallback()
See also: map()
Deprecation: Since PHP 5.3 supports anonymous functions -- REAL Lambdas -- this method is not necessary and should be avoided.
public eachLambda ( string $lambda )
$lambda string The lambda function. This will be passed ($index, &$item).
    public function eachLambda($lambda)
    {
        $index = 0;
        foreach ($this->matches as $item) {
            $fn = create_function('$index, &$item', $lambda);
            if ($fn($index, $item) === false) {
                return $this;
            }
            ++$index;
        }
        return $this;
    }