public function setViewPath(string $basePath): self
    {
        $this->viewPath = $basePath;

        if (substr($this->viewPath, -1) != '/') {
            $this->viewPath .= '/';
        }

        return $this;
    }