PHP code example of eserozvataf / scabbia2-yaml
1. Go to this page and download the library: Download eserozvataf/scabbia2-yaml library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
eserozvataf / scabbia2-yaml example snippets
use Scabbia\Yaml\Parser;
$file = file_get_contents('myConfig.yml');
$parser = new Parser();
$config = $parser->parse($file);
var_dump($config);
use Scabbia\Yaml\Dumper;
$config = [
'type' => 'mongo',
'username' => 'eserozvataf',
'password' => 'password'
];
$dumper = new Dumper();
$content = $dumper->dump($config);
file_put_contents('myConfig.yml', $content);