Example #1
0
 public static function volatileLoad()
 {
     $fn = self::$CONFIG_DECRYPTED;
     if (!file_exists(self::$CONFIG)) {
         throw new SetupMachineException();
     }
     if (!file_exists(self::$CONFIG_DECRYPTED)) {
         throw new AuthNeededException();
     }
     $admin = new Admin();
     $cfg = new Config();
     $cfg->setData(JSON::decode(file_get_contents($fn)));
     $admin->config = $cfg;
     return $admin;
 }