2009年5月2日星期六

Re: [fw-mvc] Where to place action controller helpers?

Sounds good, thanks! :)

-Hector


On Sat, May 2, 2009 at 7:29 AM, Matthew Weier O'Phinney <matthew@zend.com> wrote:
-- Hector Virgen <djvirgen@gmail.com> wrote
(on Friday, 01 May 2009, 02:32 PM -0700):
> I'm using ZF 1.8 and created a new site with Zend_Application. So far
> everything is looking good but I'm curious as to where to place my action
> controller helpers, particularly ones that are specific to this application (as
> in not library code).
>
> application/controllers/helpers/
> This seems like the most logical place, but I'm not sure if that will break
> anything with the front controller.

That's where we recommended putting them when we did the recommended
project directory structure proposal.

Which reminds me, I need to add that to the module autoloader...

> application/helpers
> This should work with the resource autoloader, but "helpers" seems too vague
> and might confuse other developers into thinking they are view helpers.
>
> library/My/Controller/Action/Helper/
> This would work but I'd like to keep application-specific files in the
> application folder.
>
> Where do you guys normally place your action helpers? Any tips would be
> appreciated. Thanks!

--
Matthew Weier O'Phinney
Project Lead            | matthew@zend.com
Zend Framework          | http://framework.zend.com/


没有评论: