From ba0e64b76c4569561f95fca47a8bd62aae520184 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Fri, 7 Mar 2014 15:44:02 +0000 Subject: [PATCH] Add application header --- scripts/getAsso.php | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/scripts/getAsso.php b/scripts/getAsso.php index de668428..07dee485 100644 --- a/scripts/getAsso.php +++ b/scripts/getAsso.php @@ -10,15 +10,28 @@ * */ -// Define path to application directory -defined('APPLICATION_PATH') - || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); - -// Ensure library/ is on include_path -set_include_path(implode(PATH_SEPARATOR, array( - realpath(APPLICATION_PATH . '/../library'), - get_include_path(), -))); +// Define path to application directory +defined('APPLICATION_PATH') + || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); + +// Define application environment +defined('APPLICATION_ENV') + || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production')); + +// Ensure library/ is on include_path +set_include_path(implode(PATH_SEPARATOR, array( + realpath(APPLICATION_PATH . '/../library'), + get_include_path(), +))); + +/** Zend_Application */ +require_once 'Zend/Application.php'; + +// Create application, bootstrap, and run +$application = new Zend_Application( + APPLICATION_ENV, + APPLICATION_PATH . '/configs/application.ini' +); require_once APPLICATION_PATH.'/configs/config.php';