final public function run()
    {
        if (isset($this->response)) {
            Yii::info("Response configured as '" . gettype($this->response) . "': "
                . VarDumper::dumpAsString($this->response), __METHOD__);

            return $this->response;
        }

        if ($response = $this->runInternal()) {
            $this->response = $response;
        }

        if (isset($this->response)) {
            Yii::info('Response exists before rendering stage, action execution completed'
                . PHP_EOL . VarDumper::dumpAsString($this->response, 2), __METHOD__);
        } else {
            if (is_callable($this->beforeRenderCallback)) {
                Yii::info('Executing before render callback', __METHOD__);
                call_user_func($this->beforeRenderCallback, $this);
            }

            $this->render();
        }

        if (is_callable($this->afterCallback)) {
            Yii::info('Executing after callback', __METHOD__);
            $this->response = call_user_func($this->afterCallback, $this);
        }

        return $this->response;
    }