class ThemePathResolver (View source)

Resolves the configured theme base path for on-disk checks.

interface.theme_base_path doubles as a web/URL path in templates, so it must stay relative there. But is_dir()/file_exists() on a relative path depend on the process working directory, which is not the app root under CLI/cron/some SAPIs - producing spurious "theme missing" errors. Every filesystem check should route the base path through this resolver so they agree on an app-rooted path.

Methods

static string
toFilesystemPath(mixed $themeBasePath)

No description

Details

static string toFilesystemPath(mixed $themeBasePath)

No description

Parameters

mixed $themeBasePath

The configured base path (falls back to 'templates' if unusable)

Return Value

string

An absolute filesystem path, rooted at the app directory for relative inputs