protected function doOperation($operation, OperationArguments $args)
    {
        try {
            // Trigger 'beforeOperation' event.
            $this->fireBeforeOperation($operation, $args);
            // Run the internal operation.
            $forwardMethod = 'forward' . ucfirst($operation);
            $returnValue   = call_user_func([$this, $forwardMethod], $args);
            // Trigger 'afterOperation' event.
            $this->fireAfterOperation($operation, $args, $returnValue);
            // Return the operation result.
            return $returnValue;
        } catch (Exception $e) {
            // Trigger 'onOperationException' event.
            $this->fireOnOperationException($operation, $args, $e);
            // Throw the original exception.
            throw $e;
        }
    }
protected function doOperation($operation, OperationArguments $args)
    {
        try {
            // Trigger 'beforeOperation' event.
            $this->fireBeforeOperation($operation, $args);
            // Run the internal operation.
            $forwardMethod = 'forward' . ucfirst($operation);
            $returnValue   = call_user_func([$this, $forwardMethod], $args);
            // Trigger 'afterOperation' event.
            $this->fireAfterOperation($operation, $args, $returnValue);
            // Return the operation result.
            return $returnValue;
        } catch (Exception $e) {
            // Trigger 'onOperationException' event.
            $this->fireOnOperationException($operation, $args, $e);
            // Throw the original exception.
            throw $e;
        }
    }
protected function doOperation ( $ operation , OperationArguments $ args ) { try { // Trigger 'beforeOperation' event. $ this -> fireBeforeOperation ( $ operation , $ args ) ; // Run the internal operation. $ forwardMethod = 'forward' . ucfirst ( $ operation ) ; $ returnValue = call_user_func ( [ $ this , $ forwardMethod ] , $ args ) ; // Trigger 'afterOperation' event. $ this -> fireAfterOperation ( $ operation , $ args , $ returnValue ) ; // Return the operation result. return $ returnValue ; } catch ( Exception $ e ) { // Trigger 'onOperationException' event. $ this -> fireOnOperationException ( $ operation , $ args , $ e ) ; // Throw the original exception. throw $ e ; } }
Do the specified operation.
@param  string $operation
@param  \Gamegos\NoSql\Storage\OperationArguments $args
@throws \Exception
Do the specified operation .