public function search($expression)
    {
        $results = [];

        foreach ($this->providers as $provider) {
            $results = array_merge($results, $provider->search($expression));
        }

        usort($results, function (Result $a, Result $b) {
            if ($a->getScore() == $b->getScore()) {
                return 0;
            }
            return $a->getScore() > $b->getScore() ? -1 : 1;
        });

        return $results;
    }
public function search($expression)
    {
        $results = [];

        foreach ($this->providers as $provider) {
            $results = array_merge($results, $provider->search($expression));
        }

        usort($results, function (Result $a, Result $b) {
            if ($a->getScore() == $b->getScore()) {
                return 0;
            }
            return $a->getScore() > $b->getScore() ? -1 : 1;
        });

        return $results;
    }
public function search ( $ expression ) { $ results = [ ] ; foreach ( $ this -> providers as $ provider ) { $ results = array_merge ( $ results , $ provider -> search ( $ expression ) ) ; } usort ( $ results , function ( Result $ a , Result $ b ) { if ( $ a -> getScore ( ) == $ b -> getScore ( ) ) { return 0 ; } return $ a -> getScore ( ) > $ b -> getScore ( ) ? - 1 : 1 ; } ) ; return $ results ; }
Performs a wide site search.

@param string $expression

@return array|Result[]
Performs a wide site search .