Zend_View를 Zend_Registry에 넣으려고합니다. 그 간단한 작업에 문제가 있습니다. Zend_View는 자원으로 application.ini 초기화합니다 : 그것은 잘 작동리소스로 Zend_View를 Zend_Registry에 넣습니다.
resources.view.encoding = "UTF-8"
resources.view.contentType = "text/html; charset=UTF-8"
resources.view.doctype = "HTML4_STRICT"
resources.view.helperPath.ZendX_JQuery_View_Helper = "ZendX/JQuery/View/Helper"
, 그때 Bootstrap.php에 방법을 추가하여 레지스트리에 넣고 싶었다.
protected function _initView()
{
$view = $this->getResource('view');
Zend_Registry::set('view', $view);
return $view;
}
내가보기 초기화 오류 얻을 새로 고침 후 :
Catchable fatal error: Argument 1 passed to ZendX_JQuery::enableView() must be an instance of Zend_View_Interface, null given, called in D:\projekty\xxx\library\ZendX\Application\Resource\Jquery.php on line 91 and defined in D:\projekty\xxx\library\ZendX\JQuery.php on line 104
내가 잘못하고있는 중이 야 무엇을? jQuery 오류가 발생하지 않습니다.
왜 뷰 객체를 레지스트리에 넣어야합니까? – Vika
좋은 점 Vika, MVC의 아이디어를 파괴합니다. –
@jake : Zend_View를 사용하여 본문을 렌더링 한 Zend_Mailer를 통해 메일러를 보내고 싶습니다. 이 aproach에 어떤 문제가 있습니까? – Somal