public function search($handler_id, $query, array $options = array())
    {
        if (!isset($options['language'])) {
            $options['language'] = 'und';
        }

        $result = null;
        $this->hook->attach('search', $handler_id, $query, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $filtered = $this->filterStopwords($query, $options['language']);

        if (empty($filtered)) {
            return null;
        }

        return $this->callHandler($handler_id, 'search', array($filtered, $options, $this));
    }
public function search($handler_id, $query, array $options = array())
    {
        if (!isset($options['language'])) {
            $options['language'] = 'und';
        }

        $result = null;
        $this->hook->attach('search', $handler_id, $query, $options, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $filtered = $this->filterStopwords($query, $options['language']);

        if (empty($filtered)) {
            return null;
        }

        return $this->callHandler($handler_id, 'search', array($filtered, $options, $this));
    }
public function search ( $ handler_id , $ query , array $ options = array ( ) ) { if ( ! isset ( $ options [ 'language' ] ) ) { $ options [ 'language' ] = 'und' ; } $ result = null ; $ this -> hook -> attach ( 'search' , $ handler_id , $ query , $ options , $ result , $ this ) ; if ( isset ( $ result ) ) { return $ result ; } $ filtered = $ this -> filterStopwords ( $ query , $ options [ 'language' ] ) ; if ( empty ( $ filtered ) ) { return null ; } return $ this -> callHandler ( $ handler_id , 'search' , array ( $ filtered , $ options , $ this ) ) ; }
Returns an array of items found for the search query
@param string $handler_id
@param string $query
@param array $options
@return mixed
Returns an array of items found for the search query