2

鉴于:

1.
引导:

$autoloader = Zend_Loader_Autoloader::getInstance();// Zend_Loader_Autoloader
$autoloader->registerNamespace('Ntk_');

等于

application.ini:
autoloaderNamespaces[] = "Ntk_"


2.
引导:

$pluginLoader = $this->getPluginLoader();// Zend_Loader_PluginLoader     
$pluginLoader->addPrefixPath('My_Resource', APPLICATION_PATH . "/appResourcePlugins");

等于

application.ini:
pluginPaths.My_Resource = APPLICATION_PATH "/appResourcePlugins"


3.
引导:

$moduleAutoloader = $this>getResourceLoader();//Zend_Application_Module_Autoloader      
$moduleAutoloader->addResourceType('need', 'needs', 'Needs');

等于

应用程序.ini:
???



配置 Zend_Application_Module_Autoloader 的 application.ini 方法是什么?
(...如果存在)
我使用 zend 框架版本 1.11.10

4

1 回答 1

-1

也许这个例子会帮助你:

    <?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{

protected function _initApplication()
{
$this->bootstrap('frontcontroller');
$front = $this->getResource('frontcontroller');
$front->addModuleDirectory(dirname(__FILE__) . '/modules');
}

protected function _initDoctype()
{
$this->bootstrap('view');
$view = $this->getResource('view');
$view->doctype('XHTML1_STRICT');
}
}

这是application.ini

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.modules = ""

resources.layout.layout = "layout"
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.view[] =

[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1 

参考:有人有同样的问题,在这里得到了他的答案

于 2011-08-25T18:52:10.647 回答