Use YAML config for the core

This commit is contained in:
Dmitriy Simushev 2014-07-09 13:47:58 +04:00
parent 11a597163b
commit 96b6df84ce
2 changed files with 20 additions and 15 deletions

View File

@ -24,14 +24,19 @@
* "<mibew root>/plugins/<Vendor Name>/Mibew/Plugin/<Plugin name>/Plugin.php"
* file. Names of plugin and directories/files are case sensitive!
*
* To turn the plugin on add the following to <mibew root>/libs/config.php
* To turn the plugin on add its definition to the following to "plugins"
* structure in <mibew root>/configs/config.yml if the "plugins" structure looks
* like:
* <code>
* $plugins_list[] = array(
* 'name' => 'Mibew:Boilerplate',
* 'config' => array(
* 'very_important_value' => '$3.50',
* );
* );
* plugins: []
* </code>
* it will become:
* <code>
* plugins:
* -
* name: "Mibew:Boilerplate"
* config:
* very_important_value: "$3.50"
* </code>
*/

View File

@ -7,14 +7,14 @@ It does nothing but can be used as a template for a real plugin.
1. Download files of the plugin.
2. Create folder "```<Mibew root>```/plugins/Mibew/Mibew/Plugin/Boilerplate" (case does matter).
3. Put files of the plugins to the just created folder.
4. Add the following lines to the end of "```<Mibew root>```/libs/config.php":
```php
$plugins_list[] = array(
'name' => 'Mibew:Boilerplate',
'config' => array(
'very_important_value' => '$3.50',
),
);
4. Add plugins defenition to "plugins" structure in "```<Mibew root>```/configs/config.yml".
If the "plugins" stucture looks like ```plugins: []``` it will become:
```yaml
plugins:
-
name: "Mibew:Boilerplate"
config:
very_important_value: "$3.50"
```
## License