YamlTransformer
class YamlTransformer implements TransformerInterface (View source)
Constants
BEFORE_FLAG |
|
AFTER_FLAG |
|
ONLY_FLAG |
|
EXCEPT_FLAG |
|
Methods
No description
No description
This is responsible for parsing a single yaml file and returning it into a format that Config can understand. Config will then be responsible for turning thie output into the final merged config.
This allows config to ignore only/except rules that have been set. This enables apps to ignore built-in rules without causing errors where a rule is undefined.
Details
__construct(string $baseDir, Finder $finder)
static YamlTransformer
create(string $baseDir, Finder $finder)
MutableConfigCollectionInterface
transform(MutableConfigCollectionInterface $collection)
This is responsible for parsing a single yaml file and returning it into a format that Config can understand. Config will then be responsible for turning thie output into the final merged config.
$this
addRule(string $rule, Closure $func)
This allows external rules to be added to only/except checks. Config is only supposed to be setup once, so adding rules is a one-way system. You cannot remove rules after being set. This also prevent built-in rules from being removed.
ignoreRule(string $rule)
This allows config to ignore only/except rules that have been set. This enables apps to ignore built-in rules without causing errors where a rule is undefined.
This, is a one-way system and is only meant to be configured once. When you ignore a rule, you cannot un-ignore it.