public function query( $view, array $options = array() )
    {
        // Build query string, just as a normal HTTP GET query string
        $url = $this->getDatabase() .
            '_design/' . $this->getViewName() . '/_view/' . $view;
        $url .= $this->buildViewQuery( $options );

        // Get database connection, because we directly execute a query here.
        $db = $this->getConnection();

        try
        {
            // Try to execute query, a failure most probably means, the view
            // has not been added, yet.
            $response = $db->get( $url );
        }
        catch ( phpillowResponseErrorException $e )
        {
            // Ensure view has been created properly and then try to execute
            // the query again. If it still fails, there is most probably a
            // real problem.
            $this->verifyView();
            $response = $db->get( $url );
        }

        return $response;
    }
public function query( $view, array $options = array() )
    {
        // Build query string, just as a normal HTTP GET query string
        $url = $this->getDatabase() .
            '_design/' . $this->getViewName() . '/_view/' . $view;
        $url .= $this->buildViewQuery( $options );

        // Get database connection, because we directly execute a query here.
        $db = $this->getConnection();

        try
        {
            // Try to execute query, a failure most probably means, the view
            // has not been added, yet.
            $response = $db->get( $url );
        }
        catch ( phpillowResponseErrorException $e )
        {
            // Ensure view has been created properly and then try to execute
            // the query again. If it still fails, there is most probably a
            // real problem.
            $this->verifyView();
            $response = $db->get( $url );
        }

        return $response;
    }
public function query ( $ view , array $ options = array ( ) ) { // Build query string, just as a normal HTTP GET query string $ url = $ this -> getDatabase ( ) . '_design/' . $ this -> getViewName ( ) . '/_view/' . $ view ; $ url .= $ this -> buildViewQuery ( $ options ) ; // Get database connection, because we directly execute a query here. $ db = $ this -> getConnection ( ) ; try { // Try to execute query, a failure most probably means, the view // has not been added, yet. $ response = $ db -> get ( $ url ) ; } catch ( phpillowResponseErrorException $ e ) { // Ensure view has been created properly and then try to execute // the query again. If it still fails, there is most probably a // real problem. $ this -> verifyView ( ) ; $ response = $ db -> get ( $ url ) ; } return $ response ; }
Query a view

Query the specified view to get a set of results. You may optionally use
the view query options as additional parameters to limit the returns
values, specified at:
http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options

@param string $view
@param array $options
@return phpillowResultArray
Query a view