Пример #1
0
 /**
  * Constructor.
  */
 public function __construct()
 {
     if (RunLevel::get() == RunLevel::PRODUCTION) {
         self::$dsn = 'mysql:host=PRODUCTION-DB-NODE-NAME;dbname=DBNAME';
         self::$username = '******';
         self::$password = '******';
     } elseif (RunLevel::get() == RunLevel::STAGING) {
         self::$dsn = 'mysql:host=STAGING-DB-NODE-NAME;dbname=DBNAME';
         self::$username = '******';
         self::$password = '******';
     } else {
         self::$dsn = 'mysql:host=localhost;dbname=DBNAME';
         self::$username = '******';
         self::$password = '';
     }
 }