Class

ConfigManager

Package: IO\Data\config Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Benoit SAUTEL ben.popeye@phpboost.com Version: PHPBoost 5.2 - last update: 2017 03 13 Since: PHPBoost 3.0 - 2009 09 16 Contributor: Julien BRISWALTER j1.seth@phpboost.com Located at: io/data/config/ConfigManager.class.php

This class manages config loading and saving. It makes a two-level lazy loading:

  • A top-level cache which avoids loading a data if it has already been done since the beginning of the current page generation. This cache has a short life span: it's flushed as of the PHP interpreter reaches the end of the page generation.
  • A filesystem or shared RAM cache to avoid querying the database many times to obtain the same value. This cache is less powerful than the previous one but it has an infinite life span. Indeed, it's valid until the value changes and the manager is asked to store it
Methods summary
public static ConfigData
# load( $classname, $module_name, $entry_name = '' )

Loads the data identified by the parameters.

public static
# save( string $module_name, ConfigData $data, string $entry_name = '' )

Saves in the data base (DB_TABLE_CONFIGS table) the data and has it become persistent.

public static
# delete( string $module_name, string $entry_name = '' )

Delete an configuration in the database and the cache