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)

Properties

protected $base
protected $tests
protected $cache
protected $key
protected $index
protected $statics
protected static $initial_classes

Methods

public
__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.

public
get($class, $name, $default)

No description

public
regenerate($cache = true)

Completely regenerates the manifest file.

public
handleFile($basename, $pathname, $depth)

No description

public
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)

No description

Parameters

$class
$name
$default

regenerate($cache = true)

Completely regenerates the manifest file.

Parameters

$cache

handleFile($basename, $pathname, $depth)

No description

Parameters

$basename
$pathname
$depth

getStatics()

No description