Created
March 23, 2014 12:51
-
-
Save mapcentia/9722667 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace app\conf; | |
class App | |
{ | |
static $param = array( | |
// The hostname of the server | |
"host" => "", | |
// The hostname of the user module. Normally this is the same as the host above | |
"userHostName" => "", | |
//Server path where GeoCLoud is installed. | |
"path" => "/var/www/geocloud2/", | |
// When creating new databases use this db as template | |
"databaseTemplate" => "template_geocloud", | |
// The host of Elasticsearch serveren | |
"esHost" => "", | |
// Encrypt api key in database | |
"encryptSettings" => false, | |
// Map attribution | |
"mapAttribution" => "Powered by <a href='http://geocloud.mapcentia.com'>MapCentia</a> ", | |
// Available baselayer | |
"baseLayers" => array( | |
array("id" => "googleStreets", "name" => "Google Street"), | |
array("id" => "googleHybrid", "name" => "Google Hybrid"), | |
array("id" => "googleSatellite", "name" => "Google Satellite"), | |
array("id" => "googleTerrain", "name" => "Google Terrain"), | |
array("id" => "bingRoad", "name" => "Bing Road"), | |
array("id" => "bingAerial", "name" => "Bing Aerial"), | |
array("id" => "bingAerialWithLabels", "name" => "Bing Aerial With Labels"), | |
array("id" => "osm", "name" => "OSM"), | |
array("id" => "mapQuestOSM", "name" => "MapQuset OSM"), | |
array("id" => "stamenToner", "name" => "Stamen Toner"), | |
), | |
"bingApiKey" => 'your_bing_map_key', | |
); | |
function __construct(){ | |
// This is the autoload function and include path setting. No need to fiddle with this. | |
spl_autoload_register(function ($className) { | |
$ds = DIRECTORY_SEPARATOR; | |
$dir = App::$param['path']; | |
$className = strtr($className, '\\', $ds); | |
$file = "{$dir}{$className}.php"; | |
if (is_readable($file)) { | |
require_once $file; | |
} | |
}); | |
set_include_path(get_include_path() . PATH_SEPARATOR . App::$param['path'] . PATH_SEPARATOR . App::$param['path'] . "app" . PATH_SEPARATOR . App::$param['path'] . "app/libs/PEAR/"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment