public function execute($query)
    {
        $context = $this->getCommandContext();

        $context->query = $query;

        if ($this->getCommandChain()->run('before.execute', $context) !== false) {
            $context->result = $this->_adapter->execute(to_str($context->query));
            $this->getCommandChain()->run('after.execute', $context);
        }

        return $context->result;
    }
public function execute($query)
    {
        $context = $this->getCommandContext();

        $context->query = $query;

        if ($this->getCommandChain()->run('before.execute', $context) !== false) {
            $context->result = $this->_adapter->execute(to_str($context->query));
            $this->getCommandChain()->run('after.execute', $context);
        }

        return $context->result;
    }
public function execute ( $ query ) { $ context = $ this -> getCommandContext ( ) ; $ context -> query = $ query ; if ( $ this -> getCommandChain ( ) -> run ( 'before.execute' , $ context ) !== false ) { $ context -> result = $ this -> _adapter -> execute ( to_str ( $ context -> query ) ) ; $ this -> getCommandChain ( ) -> run ( 'after.execute' , $ context ) ; } return $ context -> result ; }
Executes a query. The execute is ran through the  command chain.

@param string $query

@return bool
Executes a query . The execute is ran through the command chain .