public function search($type, $filename = '', $return = 'relative')
    {
        $matches = array();
        foreach ($this->elements as $location) {
            if (!($location instanceof PathFinder_Location)) {
                continue;
            }

            $path = $location->locate($type, $filename, $return);

            if (is_string($path)) {
                // file found!
                $matches[] = $path;
            }
        }

        return $matches;
    }
public function search($type, $filename = '', $return = 'relative')
    {
        $matches = array();
        foreach ($this->elements as $location) {
            if (!($location instanceof PathFinder_Location)) {
                continue;
            }

            $path = $location->locate($type, $filename, $return);

            if (is_string($path)) {
                // file found!
                $matches[] = $path;
            }
        }

        return $matches;
    }
public function search ( $ type , $ filename = '' , $ return = 'relative' ) { $ matches = array ( ) ; foreach ( $ this -> elements as $ location ) { if ( ! ( $ location instanceof PathFinder_Location ) ) { continue ; } $ path = $ location -> locate ( $ type , $ filename , $ return ) ; if ( is_string ( $ path ) ) { // file found! $ matches [ ] = $ path ; } } return $ matches ; }
Search is similar to locate, but will return array of all matching
files.

@param string $type     Type of resource to search surch as "php"
@param string $filename Name of the file to search for
@param string $return   'relative','url','path' or 'location'

@return string|object as specified by $return
Search is similar to locate but will return array of all matching files .