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" * "<mibew root>/plugins/<Vendor Name>/Mibew/Plugin/<Plugin name>/Plugin.php"
* file. Names of plugin and directories/files are case sensitive! * 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> * <code>
* $plugins_list[] = array( * plugins: []
* 'name' => 'Mibew:Boilerplate', * </code>
* 'config' => array( * it will become:
* 'very_important_value' => '$3.50', * <code>
* ); * plugins:
* ); * -
* name: "Mibew:Boilerplate"
* config:
* very_important_value: "$3.50"
* </code> * </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. 1. Download files of the plugin.
2. Create folder "```<Mibew root>```/plugins/Mibew/Mibew/Plugin/Boilerplate" (case does matter). 2. Create folder "```<Mibew root>```/plugins/Mibew/Mibew/Plugin/Boilerplate" (case does matter).
3. Put files of the plugins to the just created folder. 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": 4. Add plugins defenition to "plugins" structure in "```<Mibew root>```/configs/config.yml".
```php If the "plugins" stucture looks like ```plugins: []``` it will become:
$plugins_list[] = array( ```yaml
'name' => 'Mibew:Boilerplate', plugins:
'config' => array( -
'very_important_value' => '$3.50', name: "Mibew:Boilerplate"
), config:
); very_important_value: "$3.50"
``` ```
## License ## License