Skip to content
Permalink
Browse files

Pull in the relevant examples from the API

Add more detail to the API docs so that we don't have to pad out the
book.
  • Loading branch information...
markstory committed Aug 13, 2017
1 parent ae74105 commit d71a990dd6047439a00bdc661737b682f6b25054
@@ -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.
@@ -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
@@ -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
{
@@ -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::
*
* ```
* <?php
* return [
* 'debug' => 0,
* 'Security' => [
* 'salt' => 'its-secret'
* ],
* 'App' => [
* 'namespace' => 'App'
* ]
* ];
* ```
*
* @see Cake\Core\Configure::load() for how to load custom configuration files.
*/
class PhpConfig implements ConfigEngineInterface
{

0 comments on commit d71a990

Please sign in to comment.
You can’t perform that action at this time.