src/ContextCollection.php
public function findAll($re, $filter = null) {
        $result = array();
        $this->each(function($context) use ($re, $filter, &$result) {
            $context->findAll($re, $filter)->each(
                function($context) use (&$result) {
                    $result[] = $context;
                }
            );
        });

        return new self($result);
    }
public function findAll($re, $filter = null) {
        $result = array();
        $this->each(function($context) use ($re, $filter, &$result) {
            $context->findAll($re, $filter)->each(
                function($context) use (&$result) {
                    $result[] = $context;
                }
            );
        });

        return new self($result);
    }
public function findAll ( $ re , $ filter = null ) { $ result = array ( ) ; $ this -> each ( function ( $ context ) use ( $ re , $ filter , & $ result ) { $ context -> findAll ( $ re , $ filter ) -> each ( function ( $ context ) use ( & $ result ) { $ result [ ] = $ context ; } ) ; } ) ; return new self ( $ result ) ; }
Find all matching contexts in the collection
@param  string $re
@param  callable $filter
@return ContextCollection
Find all matching contexts in the collection