示例#1
0
 /**
  * Gets, and decrypts the database settings
  *
  * @return array|null
  */
 public static function GetDatabaseSettings()
 {
     /**
      * Lets first read our settings
      */
     $settings_encrypted = JsonReader::ReadFile('Json/database_settings.json');
     /**
      * These settings are going to be encrypted, so thanks to our trusty cypher class, lets decrypt them!
      */
     if ($settings_encrypted != null) {
         /**
          * Decrypt this array
          */
         $settings_decrypted = Cyphers::DecryptArray($settings_encrypted);
         /**
          * Return it!
          */
         return $settings_decrypted;
     }
     /**
      * Else, if we didn't find our settings, lets return null
      */
     return null;
 }