MvcLite\Config

Registry

Data store for application level storage

Synopsis

class Config extends ObjectAbstract {
  • // constants
  • const MSG_ERR_BAD_CONFIG = 'Configuration not loaded. Bad file provided';
  • // members
  • protected array $data = ;
  • // methods
  • public Config init()
  • public Config set()
  • public Config get()
  • public array getSection()
  • public Config setAll()
  • // Inherited methods from ObjectAbstract
  • public final void __get()
  • public final void __set()
  • public final void __call()
  • public void __toString()
  • public string identify()
  • // Inherited methods from Singleton
  • public static Singleton getInstance()
}

Hierarchy

Coverage

Methods 100% 5 / 5
Lines 100% 24 / 24

Constants

Name Value
MSG_ERR_BAD_CONFIG 'Configuration not loaded. Bad file provided'
MSG_ERR_IDENTIFY 'Descendents must implement the identify method'

Members

protected

Methods

public

  • get() — Getter for data.
  • getSection() — Gets an entire section of the configuration, by name.
  • init() — Init hook.
  • set() — Setter for data.
  • setAll() — Assigns multiple values to the config in a single method call.

Inherited from MvcLite\ObjectAbstract

public

  • __call() — Overriding the __call magic method
  • __get() — Overriding the __get magic method
  • __set() — Overriding the __set magic method
  • __toString() — returns a string representation of the object
  • identify() — method used to identify the object instance

Inherited from MvcLite\Traits\Singleton

public

History