PHP Classes

File: core/classes/Configuration.class.php

Recommend this page to a friend!
  Classes of Yerfry Ramirez   Simple PHP OOP CMS   core/classes/Configuration.class.php   Download  
File: core/classes/Configuration.class.php
Role: Configuration script
Content type: text/plain
Description: Configuration script
Class: Simple PHP OOP CMS
Build Web site pages from template classes
Author: By
Last change:
Date: 7 years ago
Size: 557 bytes


Class file image Download
class Configuration {
    protected static
$ConfigurationSetting = [];
    public static function
set($Name, $Value = null) {
is_array($Name) && count($Name) > 0 && is_null($Value)):
Configuration::addArray($Name); else:
Configuration::$ConfigurationSetting[$Name] = $Value;

    public static function
get($Name) { if(array_key_exists($Name, Configuration::$ConfigurationSetting)) return Configuration::$ConfigurationSetting[$Name]; }
    protected static function
addArray($Array) { Configuration::$ConfigurationSetting += $Array; }