本文整理匯總了PHP中Zend_Application::setAutoloaderNamespaces方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Application::setAutoloaderNamespaces方法的具體用法?PHP Zend_Application::setAutoloaderNamespaces怎麽用?PHP Zend_Application::setAutoloaderNamespaces使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend_Application
的用法示例。
在下文中一共展示了Zend_Application::setAutoloaderNamespaces方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: define
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();
示例2: array
<?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'));