You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
12 months ago | |
---|---|---|
.. | ||
Configure | 12 months ago | |
Exception | 12 months ago | |
Retry | 12 months ago | |
App.php | 12 months ago | |
BasePlugin.php | 12 months ago | |
ClassLoader.php | 12 months ago | |
Configure.php | 12 months ago | |
ConsoleApplicationInterface.php | 12 months ago | |
ConventionsTrait.php | 12 months ago | |
HttpApplicationInterface.php | 12 months ago | |
InstanceConfigTrait.php | 12 months ago | |
LICENSE.txt | 12 months ago | |
ObjectRegistry.php | 12 months ago | |
Plugin.php | 12 months ago | |
PluginApplicationInterface.php | 12 months ago | |
PluginCollection.php | 12 months ago | |
PluginInterface.php | 12 months ago | |
README.md | 12 months ago | |
StaticConfigTrait.php | 12 months ago | |
composer.json | 12 months ago | |
functions.php | 12 months ago |
README.md
CakePHP Core Classes
A set of classes used for configuration files reading and storing. This repository contains the classes that are used as glue for creating the CakePHP framework.
Usage
You can use the Configure
class to store arbitrary configuration data:
use Cake\Core\Configure;
use Cake\Core\Configure\Engine\PhpConfig;
Configure::write('Company.name','Pizza, Inc.');
Configure::read('Company.name'); // Returns: 'Pizza, Inc.'
It also possible to load configuration from external files:
Configure::config('default', new PhpConfig('/path/to/config/folder'));
Configure::load('app', 'default', false);
Configure::load('other_config', 'default');
And Write the configuration back into files:
Configure::dump('my_config', 'default');
Documentation
Please make sure you check the official documentation