Class ConfigFileStorage

Description

Implements interfaces:

ConfigFileStorage to store serialized configuration in files.

Usage:

  1.  $options['key''/full/path/to/config.php';
  2.  
  3.  $config ConfigFactory::get('filestorage'$options);

Located in /contenido/classes/mp/class.confighandler.php (line 144)

ConfigBaseAbstract
   |
   --ConfigFileStorage
Method Summary
 ConfigFileStorage __construct ( $options)
 mixed get ()
 bool remove ()
 bool set ( $content)
Variables
Methods
Constructor __construct (line 155)

Constructor of ConfigFileStorage, delegates parameter to parent.

  • access: public
ConfigFileStorage __construct ( $options)
  • array $options: Assoziative options array as follows:
    1.  $options['key']      Full path to configuration file
    2.  $options['lifetime'Lifetime of data in secondsoptional

Redefinition of:
ConfigBaseAbstract::__construct()
Constructor of ConfigBaseAbstract, does some checks, stops further script execution if validation of arguments fails.
get (line 169)

Reads content of configuration file and returns the content as a unserialized PHP variable.

  • return: PHP variable or nul on error
  • access: public
mixed get ()

Implementation of:
IConfigBase::get()
Method to get configuration, must be overwritten by child.
remove (line 200)

Removes (unlink) configuration file.

  • return: True on success otherwhise false
  • access: public
bool remove ()

Implementation of:
IConfigBase::remove()
Method to remove configuration, must be overwritten by child.
set (line 187)

Serializes passed configuration and stores it into the configuation file

  • return: True on success otherwhise false
  • access: public
bool set ( $content)
  • $content

Implementation of:
IConfigBase::set()
Method to set configuration, must be overwritten by child.

Inherited Methods

Inherited From ConfigBaseAbstract

 ConfigBaseAbstract::__construct()
 ConfigBaseAbstract::getExpires()

Documentation generated on Sun, 08 Feb 2009 22:00:25 +0100 by phpDocumentor 1.4.1