BaseConfigHandler
BaseConfigHandler allows a developer to create a custom formatted configuration file pertaining to any information they like.
A handler returns a declaration — data — from execute(); turning that into the compiled cache file is the cache’s job (see CompiledArtifact), not the handler’s.
Synopsis
Section titled “Synopsis”abstract class BaseConfigHandler extends ParameterHolder
| Extends | ParameterHolder |
| Since | 1.0.0 |
| Source | Config/BaseConfigHandler.php |
Methods
Section titled “Methods”| Method | Description |
|---|---|
literalize(mixed $value): mixed | Literalize a string value. |
replaceConstants(string $value): string | Replace configuration directive identifiers in a string. |
replacePath(string $path): string | Replace a relative filesystem path with an absolute one. |
literalize()
Section titled “literalize()”public static function literalize(mixed $value): mixed
Literalize a string value.
The value to literalize.
| Parameter | Type | Description |
|---|---|---|
$value | mixed | The value to literalize. |
Returns mixed — A literalized value.
replaceConstants()
Section titled “replaceConstants()”public static function replaceConstants(string $value): string
Replace configuration directive identifiers in a string.
The value on which to run the replacement procedure.
| Parameter | Type | Description |
|---|---|---|
$value | string | The value on which to run the replacement procedure. |
Returns string — The new value.
replacePath()
Section titled “replacePath()”public static function replacePath(string $path): string
Replace a relative filesystem path with an absolute one.
A relative filesystem path.
| Parameter | Type | Description |
|---|---|---|
$path | string | A relative filesystem path. |
Returns string — The new path.
Inherited methods
Section titled “Inherited methods”These come from an ancestor and are documented where they are declared.
| Method | Declared in | Description |
|---|---|---|
appendParameter() | ParameterHolder | Append a parameter. |
appendParameterByRef() | ParameterHolder | Append a parameter by reference. |
clearParameters() | ParameterHolder | Clear all parameters associated with this request. |
getFlatParameterNames() | ParameterHolder | Retrieve an array of flattened parameter names. |
getParameter() | ParameterHolder | Retrieve a parameter. |
getParameterNames() | ParameterHolder | Retrieve an array of parameter names. |
getParameters() | ParameterHolder | Retrieve an array of parameters. |
hasParameter() | ParameterHolder | Indicates whether or not a parameter exists. |
removeParameter() | ParameterHolder | Remove a parameter. |
reset() | ParameterHolder | Removes every parameter held, leaving the holder empty for reuse. |
setParameter() | ParameterHolder | Set a parameter. |
setParameterByRef() | ParameterHolder | Set a parameter by reference. |
setParameters() | ParameterHolder | Set an array of parameters. |
setParametersByRef() | ParameterHolder | Set an array of parameters by reference. |