library scabbia2-yaml
Scabbia2 Yaml Component
scabbiafw/scabbia2-yaml
Scabbia2 Yaml Component
- Tuesday, September 22, 2015
- by eserozvataf
- Repository
- 1 Watchers
- 1 Stars
- 122 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Scabbia2 Yaml Component
This component is a YAML parser allows serialization and deserialization in YAML format., (*1)
, (*2)
Usage
Parsing a YAML file
use Scabbia\Yaml\Parser;
$file = file_get_contents('myConfig.yml');
$parser = new Parser();
$config = $parser->parse($file);
var_dump($config);
Writing a YAML file
use Scabbia\Yaml\Dumper;
$config = [
'type' => 'mongo',
'username' => 'eserozvataf',
'password' => 'password'
];
$dumper = new Dumper();
$content = $dumper->dump($config);
file_put_contents('myConfig.yml', $content);
Links
Contributing
It is publicly open for any contribution. Bugfixes, new features and extra modules are welcome. All contributions should be filed on the eserozvataf/scabbia2-yaml repository., (*3)
- To contribute to code: Fork the repo, push your changes to your fork, and submit a pull request.
- To report a bug: If something does not work, please report it using GitHub issues.
- To support: