public function getMode()
    {
        if (!isset($this->mode)) {
            if (isset($_ENV['SLIM_MODE'])) {
                $this->mode = $_ENV['SLIM_MODE'];
            } else {
                $envMode = getenv('SLIM_MODE');
                if ($envMode !== false) {
                    $this->mode = $envMode;
                } else {
                    $this->mode = $this->config('mode');
                }
            }
        }

        return $this->mode;
    }