heartsentwined / yaml
Wrapper around Symfony's Yaml parser - added __DIR__ support.
Installs: 13 097
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 3
pkg:composer/heartsentwined/yaml
Requires
- php: >=5.3.3
- symfony/yaml: *
- yalesov/arg-validator: 2.*
Requires (Dev)
This package is not auto-updated.
Last update: 2025-10-25 18:49:28 UTC
README
Wrapper around Symfony's Yaml parser - added __DIR__ support.
Installation
{
"require": {
"yalesov/yaml": "2.*"
}
}
Usage
Two constants added:
__DIR__: behave as expected___DIR___(an extra underscore around): literal__DIR__
Parse a Yaml file foo/bar.yml:
use Yalesov\Yaml\Yaml; $parsedArray = Yaml::parse('foo/bar.yml');
Parse a Yaml string foo: bar (of course, neither __DIR__ nor ___DIR___ would be available)
use Yalesov\Yaml\Yaml; $parsedArray = Yaml::parse('foo: bar');