Example #1
0
<?php

include_once __DIR__ . "/../../library/appdb_configuration.php";
include_once __DIR__ . "/../../library/support.php";
$apiconf = ApplicationConfigurationIni::getNamespaceConfiguration('api');
$appconf = ApplicationConfigurationIni::getNamespaceConfiguration('app');
$hasRepository = $appconf->enableRepository && $appconf->enableRepository == 'true' ? 'true' : 'false';
header('Content-type: text/javascript');
?>
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


var appdb = {};
appdb.config = {
	deploy: {
		instance: '<?php 
echo ApplicationConfiguration::isProductionInstance() === true ? "production" : "development";
?>
'
	},
    appValidationPeriod: '<?php 
echo $appconf->invalid;
?>
',
    apiversion: '<?php 
echo $apiconf->latestVersion;
?>
',
 /**
  * Retrieve values by key under the 'saml' namespace. 
  * Eg saml.profile.allow='domain1;domain2;domain3'
  * 
  * @param String $key - The key to search the support namespace
  * @param Any $default - Default value when key does not exist
  * @return String
  */
 public static function saml($key, $default = NULL)
 {
     return ApplicationConfigurationIni::getConfigNS('saml', $key, $default);
 }