2010年8月10日星期二

[fw-mvc] Re: View Helper classes - help! 'Plugin by name... not found in the registry'

Rishi Daryanani wrote:
>
> should the following code:
> $this->addHelperPath('../application/views/helpers/', 'My_View_Helper');
> be called in the view index.phtml file, or should it be called in
> bootstrap or a
> controller file? If so, how? (e.g. how do I reference the view, if it were
> on
> the bootstrap?)
>
This is best done as a bootstrap resource. See the section "Getting started
with Bootstrap Resources" in the following article for more info:
http://weierophinney.net/matthew/archives/230-Quick-Start-to-Zend_Application_Bootstrap.html

The main take-away from the article is the following few lines:

Bootstrap resources may be one of two things:

* A protected method in the bootstrap class prefixed with "_init"; e.g.,
"protected function _initFoo()"
* A class implementing Zend_Application_Resource_Resource


This should be enough to get you moving in the right direction.

-----
--
Wil Moore III

Why is Bottom-posting better than Top-posting:
http://www.caliburn.nl/topposting.html
--
View this message in context: http://zend-framework-community.634137.n4.nabble.com/View-Helper-classes-help-Plugin-by-name-not-found-in-the-registry-tp2318421p2319962.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: