]> dev.renevier.net Git - syj.git/blob - public/index.php
version 0.1
[syj.git] / public / index.php
1 <?php
2
3 // Define path to application directory
4 defined('APPLICATION_PATH')
5     || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
6
7 // Define application environment
8 defined('APPLICATION_ENV')
9     || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
10
11 // set include directories to '.' and ../library
12 set_include_path('.' . PATH_SEPARATOR . realpath(APPLICATION_PATH . '/../library'));
13
14 /** Zend_Application */
15 require_once 'Zend/Application.php';
16
17 // Create application, bootstrap, and run
18 $application = new Zend_Application(
19     APPLICATION_ENV,
20     APPLICATION_PATH . '/configs/application.ini'
21 );
22
23 # we use this function as a marker so xgettext knows it must extract this
24 # string. This function can be used when string must be translated, but not at
25 # the place it's called. For example, Zend_Form uses a translator to translate
26 # string it has been given. So, we must pass it a non translated string.
27 function __($str) {
28     return $str;
29 }
30
31 $application->bootstrap()
32             ->run();