<?php
require_once("ConfigurationLoader.class.php");
ConfigurationLoader::update(null, null);
require_once("config.xml.php");
$config = new config();
$lineEnd = "<br />";
echo "rootDirectory=" . $config->rootDirectory . $lineEnd;
echo "DATABASE" . $lineEnd;
echo "Primary connection" . $lineEnd;
$primaryDb = $config->database->primary;
echo "host=" . $primaryDb->host . $lineEnd;
echo "username=" . $primaryDb->username . $lineEnd;
echo "password=" . $primaryDb->password . $lineEnd;
echo "timeout=" . $primaryDb->timeout . $lineEnd;
echo "portNo=" . $primaryDb->portNo . $lineEnd;
echo "Secondary connection" . $lineEnd;
$secondaryDb = $config->database->secondary;
echo "host=" . $secondaryDb->host . $lineEnd;
echo "username=" . $secondaryDb->username . $lineEnd;
echo "password=" . $secondaryDb->password . $lineEnd;
echo "timeout=" . $secondaryDb->timeout . $lineEnd;
echo "portNo=" . $secondaryDb->portNo . $lineEnd;
echo "CARD TYPES" . $lineEnd;
foreach(array_keys($config->web->cardTypes) as $key)
{
echo $key . " = " . $config->web->cardTypes[$key] . $lineEnd;
}
//This will generate a file called newconfig.xml.php that you can look at
ConfigurationLoader::update("example.xml", "newconfig.xml.php");
?>
|