Example #1
0
 /**
  * Allow ini groups to be called as static methods
  *
  * <b>Usage:</b>
  * @code
  * // Ini file:
  * [my_group]
  * option = 'value'
  *
  * [another_group]
  * option = 'no'
  * @endcode
  *
  * @code
  * // PHP
  * echo Configuration::my_group()->option; // outputs: value
  *
  * // PHP - Alternative method:
  * echo Configuration::my_group( 'option' ); // outputs: value
  * @endcode
  *
  * @param string $group
  *      The group name (eg "my_group" in the above example)
  * @param array $arguments
  *      Only the first argument is used and it is used as the property name
  * @return
  *      The requested property value
  */
 public static function __callStatic($group, $arguments = array())
 {
     if (is_null(self::$_settings)) {
         self::$_settings = new Configuration();
     }
     if (isset($arguments[0])) {
         return self::$_settings->_getValue($arguments[0], $group);
     } else {
         return self::$_settings->_getGroup($group);
     }
 }