defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__))); // Add standard library to the include path set_include_path(implode(PATH_SEPARATOR, array(APPLICATION_PATH . '/lib', get_include_path()))); // Initializing Snep Config require_once "Snep/Config.php"; Snep_Config::setConfigFile(APPLICATION_PATH . '/includes/setup.conf'); $config = Snep_Config::getConfig(); defined('SNEP_VENDOR') || define('SNEP_VENDOR', $config->ambiente->emp_nome); defined('SNEP_VERSION') || define('SNEP_VERSION', trim(file_get_contents(APPLICATION_PATH . "/configs/snep_version"))); // Define application environment $snep_env = Snep_Config::getConfig()->system->debug ? "development" : "production"; defined('APPLICATION_ENV') || define('APPLICATION_ENV', getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : $snep_env); if (APPLICATION_ENV === "development") { require_once "Zend/Debug.php"; } // Adds the modules directory to the snep module system require_once "Snep/Modules.php"; Snep_Modules::getInstance()->addPath(APPLICATION_PATH . "/modules"); /** Zend_Application */ require_once 'Zend/Application.php'; require_once 'Zend/Config/Ini.php'; // Create application, bootstrap, and run $application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/application.ini'); // Adding standard lib autoloader capabilities to keep old code running $application->setAutoloaderNamespaces(array("Asterisk_", "PBX_", "Snep_")); // Keeping old links to avoid rework in too much stuff. require_once "Zend/Registry.php"; Zend_Registry::set("config", $config); Zend_Registry::set("db", Snep_Db::getInstance()); /* Fight! */ $application->bootstrap()->run();
<?php set_include_path(implode(PATH_SEPARATOR, array(realpath(dirname(__FILE__) . '/library'), get_include_path()))); require_once 'Zend/Application.php'; $application = new \Zend_Application('development'); $application->setAutoloaderNamespaces(array('Symfony', 'Ionix'));