SfConfigShim
in package
Standalone sfConfig implementation for when Symfony is not loaded.
Provides the same static API as Symfony's sfConfig class, backed by a simple array store. Only activated when the real sfConfig class doesn't exist (i.e., booting via heratio.php without Symfony).
Table of Contents
Methods
- add() : void
- bootstrap() : void
- Pre-populate with essential paths and defaults.
- clear() : void
- get() : mixed
- getAll() : array<string|int, mixed>
- has() : bool
- register() : void
- Register this shim as the global sfConfig class.
- set() : void
Methods
add()
public
static add([array<string|int, mixed> $parameters = [] ]) : void
Parameters
- $parameters : array<string|int, mixed> = []
bootstrap()
Pre-populate with essential paths and defaults.
public
static bootstrap(string $rootDir) : void
Parameters
- $rootDir : string
clear()
public
static clear() : void
get()
public
static get(string $name[, mixed $default = null ]) : mixed
Parameters
- $name : string
- $default : mixed = null
getAll()
public
static getAll() : array<string|int, mixed>
Return values
array<string|int, mixed>has()
public
static has(string $name) : bool
Parameters
- $name : string
Return values
boolregister()
Register this shim as the global sfConfig class.
public
static register() : void
Only call this when Symfony's sfConfig is NOT loaded.
set()
public
static set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed