Cascade Core  v0.12-1-g22cbbeb
 All Classes Namespaces Functions Variables Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
JsonConfig Class Reference

Manage configuration stored in JSON files in core, plugins and application directories. More...

Inheritance diagram for JsonConfig:
Inheritance graph

Public Member Functions

 clearCache ()
 Clear cache. More...
 
 load ($name, $force_cache_reload=false)
 Load and compose configuration from config files. More...
 

Static Public Member Functions

static readJson ($filename)
 Read JSON file. More...
 

Protected Member Functions

 fetchFromCache ($key, &$hit)
 Retrieve configuration from cache.
 
 addToCache ($key, $value)
 Add configuration to cache.
 

Detailed Description

Manage configuration stored in JSON files in core, plugins and application directories.

All files of the same name in these locations are merged together.

This class does not use caching, but other classes can extend this one and add any cache implementation.

Member Function Documentation

clearCache ( )

Clear cache.

This should be called after deploy.

Implements IConfig.

load (   $name,
  $force_cache_reload = false 
)

Load and compose configuration from config files.

Core, plugins, application and local config files are searched.

Implements IConfig.

Here is the call graph for this function:

static readJson (   $filename)
static

Read JSON file.

/

Todo:
Why this is not private?