PathResolver
in package
Centralized path resolution for AtoM framework.
Resolves paths using priority:
- sfConfig (Symfony context)
- Environment variables (ATOM_ROOT, ATOM_PLUGINS_DIR)
- Constants (ATOM_ROOT_PATH from bootstrap)
- Relative path detection
Table of Contents
Methods
- getBackupsDir() : string
- Get the backups directory.
- getBaseModulePath() : string
- Get a base AtoM module action path.
- getCacheDir() : string
- Get the cache directory.
- getConfigDir() : string
- Get the config directory.
- getConfigFile() : string
- Get the config file path.
- getDataDir() : string
- Get the data directory.
- getFrameworkAutoloadPath() : string
- Get the framework autoload path.
- getFrameworkDir() : string
- Get the framework directory.
- getFrameworkVendorDir() : string
- Get the framework vendor directory.
- getLibraryPath() : string|null
- Get a library path, checking framework vendor first, then root vendor.
- getLogDir() : string
- Get the log directory.
- getPluginPath() : string
- Get a plugin's path.
- getPluginsDir() : string
- Get the plugins directory.
- getRootAutoloadPath() : string
- Get the root autoload path.
- getRootDir() : string
- Get the AtoM root directory.
- getUploadsDir() : string
- Get the uploads directory.
- getVendorDir() : string
- Get the root vendor directory.
- reset() : void
- Reset cached paths (useful for testing).
- setPluginsDir() : void
- Set plugins directory explicitly.
- setRootDir() : void
- Set root directory explicitly (for testing or special contexts).
Methods
getBackupsDir()
Get the backups directory.
public
static getBackupsDir() : string
Return values
stringgetBaseModulePath()
Get a base AtoM module action path.
public
static getBaseModulePath(string $module, string $action) : string
Parameters
- $module : string
- $action : string
Return values
stringgetCacheDir()
Get the cache directory.
public
static getCacheDir() : string
Return values
stringgetConfigDir()
Get the config directory.
public
static getConfigDir() : string
Return values
stringgetConfigFile()
Get the config file path.
public
static getConfigFile() : string
Return values
stringgetDataDir()
Get the data directory.
public
static getDataDir() : string
Return values
stringgetFrameworkAutoloadPath()
Get the framework autoload path.
public
static getFrameworkAutoloadPath() : string
Return values
stringgetFrameworkDir()
Get the framework directory.
public
static getFrameworkDir() : string
Return values
stringgetFrameworkVendorDir()
Get the framework vendor directory.
public
static getFrameworkVendorDir() : string
Return values
stringgetLibraryPath()
Get a library path, checking framework vendor first, then root vendor.
public
static getLibraryPath(string $package) : string|null
Parameters
- $package : string
Return values
string|nullgetLogDir()
Get the log directory.
public
static getLogDir() : string
Return values
stringgetPluginPath()
Get a plugin's path.
public
static getPluginPath(string $pluginName) : string
Parameters
- $pluginName : string
Return values
stringgetPluginsDir()
Get the plugins directory.
public
static getPluginsDir() : string
Return values
stringgetRootAutoloadPath()
Get the root autoload path.
public
static getRootAutoloadPath() : string
Return values
stringgetRootDir()
Get the AtoM root directory.
public
static getRootDir() : string
Return values
stringgetUploadsDir()
Get the uploads directory.
public
static getUploadsDir() : string
Return values
stringgetVendorDir()
Get the root vendor directory.
public
static getVendorDir() : string
Return values
stringreset()
Reset cached paths (useful for testing).
public
static reset() : void
setPluginsDir()
Set plugins directory explicitly.
public
static setPluginsDir(string $path) : void
Parameters
- $path : string
setRootDir()
Set root directory explicitly (for testing or special contexts).
public
static setRootDir(string $path) : void
Parameters
- $path : string