Your IP : 216.73.217.6


Current Path : /home/smartconb/www/armencom33/acv2026/classes/
Upload File :
Current File : /home/smartconb/www/armencom33/acv2026/classes/Config.class.php

<?php

/**
 * User: zaven
 * Date: 15.02.2016
 * Time: 16:24
 * Project: ts
 **/
class Config
{
    protected static $config = null;

    private $environmentIsProd = true;

    //private $dbHost = 'mysql51-76.pro';
    private $dbHost = 'smartconbamcom.mysql.db';
    private $dbUser = 'smartconbamcom';
    private $dbPassword = 'NewSql205';
    private $dbName = 'smartconbamcom';
    private $dbPort = '3306';
    private $dbCharSet = 'utf8';
    private $dbPrefix = 'ac_';
    private $contactEmail = 'network@mariette.be';
    private $contactAdminEmail = 'network@mariette.be';

    private $defaultLanguage = 'fr';

    private $_db = null;

    private function __construct($options = array())
    {
        if (is_array($options)) {
            foreach ($options as $key => $value) {
                if (array_key_exists($key, get_object_vars($this))) {
                    $this->$key = $value;
                }
            }
        }


        //if (!class_exists('DB'))
        //    require_once('DB.class.php');
        //$this->_db = DB::get();
        return $this;
    }

    public static function get($options = array())
    {
        if (self::$config == null)
            self::$config = new Config($options);
        return self::$config;
    }

    public function getMember($memberName)
    {
        if (array_key_exists($memberName, get_object_vars($this))) {
            return $this->$memberName;
        }
        return null;
    }
}