diff --git a/src/Core/Configure/ConfigEngineInterface.php b/src/Core/Configure/ConfigEngineInterface.php index 710c1fc7df1..188c0b9ad29 100644 --- a/src/Core/Configure/ConfigEngineInterface.php +++ b/src/Core/Configure/ConfigEngineInterface.php @@ -21,7 +21,9 @@ interface ConfigEngineInterface { /** - * Read method is used for reading configuration information from sources. + * Read a configuration file/storage key + * + * This method is used for reading configuration information from sources. * These sources can either be static resources like files, or dynamic ones like * a database, or other datasource. * @@ -31,7 +33,7 @@ interface ConfigEngineInterface public function read($key); /** - * Dumps the configure data into source. + * Dumps the configure data into the storage key/file of the given `$key`. * * @param string $key The identifier to write to. * @param array $data The data to dump. diff --git a/src/Core/Configure/Engine/IniConfig.php b/src/Core/Configure/Engine/IniConfig.php index 7ae60f5dae4..66379c91d37 100644 --- a/src/Core/Configure/Engine/IniConfig.php +++ b/src/Core/Configure/Engine/IniConfig.php @@ -42,7 +42,7 @@ * * `Configure::read('section.key'); * - * You can combine `.` separated values with sections to create more deeply + * You can also use `.` separated values in section names to create more deeply * nested structures. * * IniConfig also manipulates how the special ini values of diff --git a/src/Core/Configure/Engine/JsonConfig.php b/src/Core/Configure/Engine/JsonConfig.php index 5ceec6e304e..b454347933c 100644 --- a/src/Core/Configure/Engine/JsonConfig.php +++ b/src/Core/Configure/Engine/JsonConfig.php @@ -21,6 +21,20 @@ /** * JSON engine allows Configure to load configuration values from * files containing JSON strings. + * + * An example JSON file would look like:: + * + * ``` + * { + * "debug": false, + * "App": { + * "namespace": "MyApp" + * }, + * "Security": { + * "salt": "its-secret" + * } + * } + * ``` */ class JsonConfig implements ConfigEngineInterface { diff --git a/src/Core/Configure/Engine/PhpConfig.php b/src/Core/Configure/Engine/PhpConfig.php index 85db8036962..9f4fc2d5e05 100644 --- a/src/Core/Configure/Engine/PhpConfig.php +++ b/src/Core/Configure/Engine/PhpConfig.php @@ -24,6 +24,23 @@ * * Files compatible with PhpConfig should return an array that * contains all of the configuration data contained in the file. + * + * An example configuration file would look like:: + * + * ``` + * 0, + * 'Security' => [ + * 'salt' => 'its-secret' + * ], + * 'App' => [ + * 'namespace' => 'App' + * ] + * ]; + * ``` + * + * @see Cake\Core\Configure::load() for how to load custom configuration files. */ class PhpConfig implements ConfigEngineInterface {