From 96b6df84ce0ff9a80574dd8f97b386c5551a1097 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Wed, 9 Jul 2014 13:47:58 +0400 Subject: [PATCH] Use YAML config for the core --- Plugin.php | 19 ++++++++++++------- README.md | 16 ++++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Plugin.php b/Plugin.php index 780bc66..c0fe763 100644 --- a/Plugin.php +++ b/Plugin.php @@ -24,14 +24,19 @@ * "/plugins//Mibew/Plugin//Plugin.php" * file. Names of plugin and directories/files are case sensitive! * - * To turn the plugin on add the following to /libs/config.php + * To turn the plugin on add its definition to the following to "plugins" + * structure in /configs/config.yml if the "plugins" structure looks + * like: * - * $plugins_list[] = array( - * 'name' => 'Mibew:Boilerplate', - * 'config' => array( - * 'very_important_value' => '$3.50', - * ); - * ); + * plugins: [] + * + * it will become: + * + * plugins: + * - + * name: "Mibew:Boilerplate" + * config: + * very_important_value: "$3.50" * */ diff --git a/README.md b/README.md index 1e4ff3d..8f3fa88 100644 --- a/README.md +++ b/README.md @@ -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 "``````/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 "``````/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 "``````/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