cakephp/core

CakePHP Framework Core classes

Installs: 3 269 441

Dependents: 21

Suggesters: 0

Security: 0

Stars: 45

Watchers: 28

Forks: 4

4.1.4 2020-08-13 23:43 UTC

This package is auto-updated.

Last update: 2020-09-06 01:44:58 UTC


README

Total Downloads License

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