2013-12-18 21:48:32 +01:00
|
|
|
<?php
|
|
|
|
error_reporting(E_ALL | E_STRICT);
|
|
|
|
|
2017-02-20 21:47:53 +01:00
|
|
|
// load composer autoloader
|
|
|
|
require_once __DIR__.'/../../../vendor/autoload.php';
|
|
|
|
|
2013-12-18 21:48:32 +01:00
|
|
|
// Define path to application directory
|
|
|
|
defined('APPLICATION_PATH')
|
2015-01-28 19:19:50 +01:00
|
|
|
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application/'));
|
|
|
|
|
|
|
|
// Define path to configs directory
|
|
|
|
define('CONFIG_PATH', APPLICATION_PATH . '/configs/');
|
2013-12-18 21:48:32 +01:00
|
|
|
|
|
|
|
// Define application environment
|
|
|
|
defined('APPLICATION_ENV')
|
|
|
|
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));
|
|
|
|
|
|
|
|
// Ensure library/ is on include_path
|
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
|
|
realpath('./library'),
|
|
|
|
get_include_path(),
|
|
|
|
)));
|
|
|
|
|
2013-12-18 22:05:31 +01:00
|
|
|
// Ensure library/ is on include_path
|
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
|
|
get_include_path(),
|
|
|
|
realpath(APPLICATION_PATH . '/../library')
|
|
|
|
)));
|
|
|
|
|
2015-01-27 16:53:58 +01:00
|
|
|
// Ensure vendor/ is on the include path
|
2013-12-19 21:31:12 +01:00
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
|
|
get_include_path(),
|
2018-12-22 23:42:39 +01:00
|
|
|
realpath(APPLICATION_PATH . '/../../vendor'),
|
|
|
|
realpath(APPLICATION_PATH . '/../../vendor/zf1s/zend-loader/library')
|
2015-01-27 16:53:58 +01:00
|
|
|
)));
|
|
|
|
|
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
|
|
get_include_path(),
|
|
|
|
realpath(APPLICATION_PATH . '/../../vendor/propel/propel1/runtime/lib')
|
2013-12-19 21:31:12 +01:00
|
|
|
)));
|
|
|
|
|
2013-12-19 17:16:06 +01:00
|
|
|
// Ensure library/ is on include_path
|
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
|
|
get_include_path(),
|
|
|
|
realpath(APPLICATION_PATH . '/../../install_minimal/include')
|
|
|
|
)));
|
|
|
|
|
2017-02-20 21:47:53 +01:00
|
|
|
require_once CONFIG_PATH . '/constants.php';
|
|
|
|
|
|
|
|
Logging::setLogPath(LIBRETIME_LOG_DIR . '/zendphp.log');
|
2014-01-24 17:39:15 +01:00
|
|
|
|
2013-12-18 22:05:31 +01:00
|
|
|
set_include_path(APPLICATION_PATH . '/common' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
|
|
|
//Propel classes.
|
|
|
|
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2013-12-19 17:16:06 +01:00
|
|
|
//Services
|
|
|
|
set_include_path(APPLICATION_PATH . '/services' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2014-01-16 23:01:22 +01:00
|
|
|
//models
|
|
|
|
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2014-02-05 21:37:47 +01:00
|
|
|
//Controllers.
|
|
|
|
set_include_path(APPLICATION_PATH . '/controllers' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2013-12-18 22:05:31 +01:00
|
|
|
//Controller plugins.
|
|
|
|
set_include_path(APPLICATION_PATH . '/controllers/plugins' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2014-01-07 00:08:57 +01:00
|
|
|
//test data
|
2014-01-24 22:08:38 +01:00
|
|
|
set_include_path(APPLICATION_PATH . '/../tests/application/testdata' . PATH_SEPARATOR . get_include_path());
|
2014-01-07 00:08:57 +01:00
|
|
|
|
2014-01-08 21:51:11 +01:00
|
|
|
//helper functions
|
|
|
|
set_include_path(APPLICATION_PATH . '/../tests/application/helpers' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2015-01-27 16:53:58 +01:00
|
|
|
//cloud storage files
|
|
|
|
set_include_path(APPLICATION_PATH . '/cloud_storage' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2013-12-19 21:31:12 +01:00
|
|
|
require_once APPLICATION_PATH.'/configs/conf.php';
|
2015-01-27 16:53:58 +01:00
|
|
|
require_once 'propel/propel1/runtime/lib/Propel.php';
|
2013-12-19 21:31:12 +01:00
|
|
|
Propel::init("../application/configs/airtime-conf-production.php");
|
|
|
|
|
2013-12-19 17:40:35 +01:00
|
|
|
Zend_Session::start();
|
2014-01-23 23:04:29 +01:00
|
|
|
|