Todaymade\Daux\Daux::normalizeThemePath PHP Метод

normalizeThemePath() публичный Метод

public normalizeThemePath ( $path )
    public function normalizeThemePath($path)
    {
        // When running through `daux --serve` we set an environment variable to know where we started from
        $env = getenv('DAUX_THEME');
        if ($env && is_dir($env)) {
            return $env;
        }
        if (is_dir($path)) {
            if (DauxHelper::isAbsolutePath($path)) {
                return $path;
            }
            return getcwd() . '/' . $path;
        }
        $newPath = $this->local_base . DIRECTORY_SEPARATOR . $path;
        if (is_dir($newPath)) {
            return $newPath;
        }
        throw new Exception('The Themes directory does not exist. Check the path again : ' . $path);
    }