Factory
extends BaseConfig
in package
Factories Configuration file.
Provides overriding directives for how Factories should handle discovery and instantiation of specific components. Each property should correspond to the lowercase, plural component name.
Table of Contents
- $default : array<string|int, mixed>
- Supplies a default set of options to merge for all unspecified factory components.
- $models : array<string|int, mixed>
- Specifies that Models should always favor child classes to allow easy extension of module Models.
- $registrars : array<string|int, mixed>
- An optional array of classes that will act as Registrars for rapidly setting config class properties.
- $didDiscovery : bool
- Has module discovery happened yet?
- $moduleConfig : Modules
- The modules configuration.
- __construct() : mixed
- Will attempt to get environment variables with names that match the properties of the child class.
- getEnvValue() : mixed
- Retrieve an environment-specific configuration setting
- initEnvValue() : mixed
- Initialization an environment-specific configuration setting
- registerProperties() : mixed
- Provides external libraries a simple way to register one or more options into a config file.
Properties
$default
Supplies a default set of options to merge for all unspecified factory components.
public
static array<string|int, mixed>
$default
= ['component' => null, 'path' => null, 'instanceOf' => null, 'getShared' => true, 'preferApp' => true]
$models
Specifies that Models should always favor child classes to allow easy extension of module Models.
public
array<string|int, mixed>
$models
= ['preferApp' => true]
$registrars
An optional array of classes that will act as Registrars for rapidly setting config class properties.
public
static array<string|int, mixed>
$registrars
= []
$didDiscovery
Has module discovery happened yet?
protected
static bool
$didDiscovery
= false
$moduleConfig
The modules configuration.
protected
static Modules
$moduleConfig
Methods
__construct()
Will attempt to get environment variables with names that match the properties of the child class.
public
__construct() : mixed
The "shortPrefix" is the lowercase-only config class name.
Return values
mixed —getEnvValue()
Retrieve an environment-specific configuration setting
protected
getEnvValue(string $property, string $prefix, string $shortPrefix) : mixed
Parameters
- $property : string
- $prefix : string
- $shortPrefix : string
Return values
mixed —initEnvValue()
Initialization an environment-specific configuration setting
protected
initEnvValue(mixed &$property, string $name, string $prefix, string $shortPrefix) : mixed
Parameters
- $property : mixed
- $name : string
- $prefix : string
- $shortPrefix : string
Return values
mixed —registerProperties()
Provides external libraries a simple way to register one or more options into a config file.
protected
registerProperties() : mixed