YACL is lightweight and easy to use library, which allows you to make your configuration files easy to read and edit.
- Composer (for installation)
- PHP 7.1 or higher
Use composer to install it
composer require mkgor/yacl
After installation, you are ready to use it
<?php
$result = $this->manager->parseYcl('path-to-your-file.ycl');
//Getting data as array
$configurationArray = $result->asArray();
//Getting data as PHP object
$configurationObject = $result->asObject();
Creating simple key => value item
key is "value"
Creating array / multidimensional array
arrayName are
key is "value"
secondArray are
secondKey is "secondValue"
end
end
You also can create inline array and specify its items in one line
inlineArray are "firstValue","secondValue","thirdValue" end
In near future i will create .ycl syntax highlighting plugin for Sublime Text