class SS_ConfigStaticManifest (View source)

A utility class which builds a manifest of the statics defined in all classes, along with their access levels and values

We use this to make the statics that the Config system uses as default values be truely immutable.

It has the side effect of allowing Config to avoid private-level access restrictions, so we can optionally catch attempts to modify the config statics (otherwise the modification will appear to work, but won't actually have any effect - the equvilent of failing silently)

Methods

__construct(string $base, bool $includeTests = false, bool $forceRegen = false, bool $cache = true)

Constructs and initialises a new config static manifest, either loading the data from the cache or re-scanning for classes.

get($class, $name, $default)

No description

regenerate($cache = true)

Completely regenerates the manifest file.

handleFile($basename, $pathname, $depth)

No description

getStatics()

No description

Details

__construct(string $base, bool $includeTests = false, bool $forceRegen = false, bool $cache = true)

Constructs and initialises a new config static manifest, either loading the data from the cache or re-scanning for classes.

Parameters

string $base

The manifest base path.

bool $includeTests

Include the contents of "tests" directories.

bool $forceRegen

Force the manifest to be regenerated.

bool $cache

If the manifest is regenerated, cache it.

get($class, $name, $default)

Parameters

$class
$name
$default

regenerate($cache = true)

Completely regenerates the manifest file.

Parameters

$cache

handleFile($basename, $pathname, $depth)

Parameters

$basename
$pathname
$depth

getStatics()