<?php
class Configuration {
protected static $ConfigurationSetting = [];
public static function set($Name, $Value = null) {
if(is_array($Name) && count($Name) > 0 && is_null($Value)):
Configuration::addArray($Name); else:
Configuration::$ConfigurationSetting[$Name] = $Value;
endif;
}
public static function get($Name) { if(array_key_exists($Name, Configuration::$ConfigurationSetting)) return Configuration::$ConfigurationSetting[$Name]; }
protected static function addArray($Array) { Configuration::$ConfigurationSetting += $Array; }
}
?>
|