2011-03-18 2 views
1

은 그래서젠드 프레임 워크 부트 스트랩 오류

protected function _initSetDefaultKeywords() { 
    $view = $this->bootstrap('view')->getResource('view');   
    $view->keywords = 'default keywords'; 
} 

을 bootstrap.php이 줄을 추가했지만 그것은 내가 application.ini하는 resources.view[] = ""을 추가하는 시도 오류 때문에

Fatal error: Uncaught exception 'Zend_Application_Bootstrap_Exception' with message 'Resource matching "view" not found 

를 표시 할 것이지만, 그럴 때 내 모든보기 도우미가 갑자기 작동을 멈 춥니 다.

* s 

An error occurred 
Application error 
Exception information: 

    Message: Plugin by name 'X' was not found in the registry 

어떻게 해결합니까?

현재있는 App.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" 
appnamespace = "Application" 
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" 
resources.frontController.params.displayExceptions = 0 
resources.frontController.defaultControllerName = "view" 
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 
resources.frontController.params.displayExceptions = 1 
+0

당신이 현재 application.ini 파일을 게시 할 수 있을까? – emaillenin

답변

5

당신의 application.ini이 시도 :

resources.view[] = "" 
resources.view.helperPath.MyNamespace_View_Helper = "MyNamespace/View/Helper" 

것은 당신의 ViewHelpers의 실제 접두사 MyNamespace_View_Helper을 변경해야합니다.

또한 변수 당신 AutoloaderNamespaces 경로를 추가해야합니다 :

autoloaderNamespaces.MyNamespace = "MyNamespace_" 
+0

첫 번째 구성 줄은 필요 없으며 두 번째 구성 줄은보기 리소스에 대한 config 배열을 설정합니다. – Phil

+0

@ Phil - 감사합니다. @kamikaze_pilot에 줄을 써야 할 곳을 알려 주려고했습니다. – leek

관련 문제