2008年8月7日星期四

Re: [fw-mvc] Prevent action from being executed

Every information article/book I've seen has used the action stack to do this
so it is interesting you should say this matthew, but it does make sense. Do
you have any examples of using a view helper to do this? I like examples :)


Matthew Weier O'Phinney-3 wrote:
>
> -- Greg Freeman <greg@imagize.com.au> wrote
> (on Thursday, 07 August 2008, 04:49 PM -0700):
>> How do you prevent an action from being called directly? I have an action
>> that is used to render a menu response segment for the layout. I don't
>> want
>> people to be able to call it directly via a URL.
>
> Honestly, I'd recommend creating a view helper that queries the model
> and prepares the content instead of using action(). action() is
> expensive in terms of processing, and leads to issues just like the one
> you're experiencing. :)
>
> --
> Matthew Weier O'Phinney
> Software Architect | matthew@zend.com
> Zend Framework | http://framework.zend.com/
>
>

--
View this message in context: http://www.nabble.com/Prevent-action-from-being-executed-tp18882299p18884989.html
Sent from the Zend MVC mailing list archive at Nabble.com.

没有评论: