ModuleManifest
class ModuleManifest (View source)
A utility class which builds a manifest of configuration items
Traits
Provides extensions to this object to integrate it with standard config API methods.
Constants
PROJECT_KEY |
|
Properties
static private array | $module_priority | List of modules sorted by priority |
|
static private string | $project | Project name |
Methods
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
Gets the uninherited value for the given config option
Adds a path as a module
Returns true if the passed module exists
Constructs and initialises a new configuration object, either loading from the cache or re-scanning for classes.
No description
Includes all of the php _config.php files found by this manifest.
Completely regenerates the manifest file. Scans through finding all php _config.php and yaml _config/*.ya?ml files,parses the yaml files into fragments, sorts them and figures out what values need to be checked to pick the correct variant.
Get modules found
Sort modules sorted by priority
Get module that contains the given path
Details
static Config_ForClass
config()
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
mixed
stat(string $name)
deprecated
deprecated
Get inherited config value
mixed
uninherited(string $name)
Gets the uninherited value for the given config option
$this
set_stat(string $name, mixed $value)
deprecated
deprecated
Update the config value for a given property
addModule(string $path)
Adds a path as a module
bool
moduleExists(string $name)
Returns true if the passed module exists
__construct(string $base, CacheFactory $cacheFactory = null)
Constructs and initialises a new configuration object, either loading from the cache or re-scanning for classes.
init(bool $includeTests = false, bool $forceRegen = false)
activateConfig()
Includes all of the php _config.php files found by this manifest.
regenerate(bool $includeTests = false)
Completely regenerates the manifest file. Scans through finding all php _config.php and yaml _config/*.ya?ml files,parses the yaml files into fragments, sorts them and figures out what values need to be checked to pick the correct variant.
Does not build the actual variant
Module
getModule(string $name)
Get module by name
Module[]
getModules()
Get modules found
void
sort()
Sort modules sorted by priority
Module
getModuleByPath(string $path)
Get module that contains the given path