Action -methods vs public methods in PHP frameworks
Posted
by Tower
on Stack Overflow
See other posts from Stack Overflow
or by Tower
Published on 2010-04-18T10:40:19Z
Indexed on
2010/04/18
10:43 UTC
Read the original article
Hit count: 597
There are plenty of PHP frameworks out there as many of you know, and I am interested in your thoughts on this: Zend Framework has so-called action controllers that must contain at least one action method, a method whose name ends in "Action". For example:
public function indexAction() {}
The word "Action" is important, without it you can't access the method directly via the URI. However, in some other frameworks like Kohana you have public and private methods, where public methods are accessible and private are not. So my question is which do you think is a better approach? From a secure point of view I would vote Zend's approach, but I am interested in knowing what others think.
© Stack Overflow or respective owner