本文整理汇总了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'));