107 lines
2 KiB
PHP
107 lines
2 KiB
PHP
<?php
|
|
|
|
/**
|
|
* The Legend of Z
|
|
*
|
|
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
|
* @copyright 2014 Heinrich-Heine-Universität Düsseldorf
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
|
* @link https://bitbucket.org/coderkun/the-legend-of-z
|
|
*/
|
|
|
|
namespace nre\configs;
|
|
|
|
|
|
/**
|
|
* Application configuration.
|
|
*
|
|
* This class contains static variables with configuration values for
|
|
* the specific application.
|
|
*
|
|
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
|
*/
|
|
final class AppConfig
|
|
{
|
|
|
|
/**
|
|
* Application values
|
|
*
|
|
* @static
|
|
* @var array
|
|
*/
|
|
public static $app = array(
|
|
'name' => 'The Legend of Z',
|
|
'namespace' => 'hhu\\z\\',
|
|
'timeZone' => 'Europe/Berlin'
|
|
);
|
|
|
|
|
|
/**
|
|
* Default values
|
|
*
|
|
* @static
|
|
* @var array
|
|
*/
|
|
public static $defaults = array(
|
|
'toplevel' => 'html',
|
|
'toplevel-error' => 'fault',
|
|
'intermediate' => 'introduction',
|
|
'intermediate-error' => 'error',
|
|
'language' => 'de_DE.utf8'
|
|
);
|
|
|
|
|
|
/**
|
|
* Directories
|
|
*
|
|
* @static
|
|
* @var array
|
|
*/
|
|
public static $dirs = array(
|
|
'locale' => 'locale'
|
|
);
|
|
|
|
|
|
/**
|
|
* Routes
|
|
*
|
|
* @static
|
|
* @var array
|
|
*/
|
|
public static $routes = array(
|
|
array('css/?(.*)', 'css/$1?layout=stylesheet', false),
|
|
array('users/([^/]+)/(edit|delete)', 'users/$2/$1', true),
|
|
array('users/(?!(index|login|logout|create|edit|delete))', 'users/user/$1', true),
|
|
array('seminaries/(.+)', 'seminaries/seminary/$1', false)
|
|
);
|
|
|
|
|
|
/**
|
|
* Reverse routes
|
|
*
|
|
* @static
|
|
* @var array
|
|
*/
|
|
public static $reverseRoutes = array(
|
|
array('users/user/(.*)', 'users/$1', true),
|
|
array('users/([^/]+)/(.*)', 'users/$2/$1', true),
|
|
array('seminaries/seminary/(.*)', 'seminaries/$1', false)
|
|
);
|
|
|
|
|
|
/**
|
|
* Database connection settings
|
|
*
|
|
* @static
|
|
* @var array
|
|
*/
|
|
public static $database = array(
|
|
'user' => 'z',
|
|
'host' => 'localhost',
|
|
'password' => 'legendofZ',
|
|
'db' => 'z'
|
|
);
|
|
|
|
}
|
|
|
|
?>
|