public function fetch()
    {
        $this->parse();
        $parseEvent = new QueryEvent($this);
        $this->getEntityManager()->getEventManager()->dispatch(QueryEvents::PARSE, $parseEvent);

        $result = call_user_func($this->handlers[$this->getOperation()], $this);
        $executeEvent = new QueryEvent($this, $result);
        $this->getEntityManager()->getEventManager()->dispatch(QueryEvents::EXECUTE, $executeEvent);

        return $result;
    }
public function fetch()
    {
        $this->parse();
        $parseEvent = new QueryEvent($this);
        $this->getEntityManager()->getEventManager()->dispatch(QueryEvents::PARSE, $parseEvent);

        $result = call_user_func($this->handlers[$this->getOperation()], $this);
        $executeEvent = new QueryEvent($this, $result);
        $this->getEntityManager()->getEventManager()->dispatch(QueryEvents::EXECUTE, $executeEvent);

        return $result;
    }
public function fetch ( ) { $ this -> parse ( ) ; $ parseEvent = new QueryEvent ( $ this ) ; $ this -> getEntityManager ( ) -> getEventManager ( ) -> dispatch ( QueryEvents :: PARSE , $ parseEvent ) ; $ result = call_user_func ( $ this -> handlers [ $ this -> getOperation ( ) ] , $ this ) ; $ executeEvent = new QueryEvent ( $ this , $ result ) ; $ this -> getEntityManager ( ) -> getEventManager ( ) -> dispatch ( QueryEvents :: EXECUTE , $ executeEvent ) ; return $ result ; }
Runs the query and fetches the results.

@return QueryResultset|Content|null
Runs the query and fetches the results .