Welcome Guest, Not a member yet? Register   Sign In
CONTROLLERS, single method or different methods for different actions?
#13

(05-11-2016, 02:31 PM)cartalot Wrote:
(05-10-2016, 03:28 PM)Narf Wrote: But we're in the PHP7 era now and "private" has a specific meaning. Also, making controller methods really private by using the keyword works just fine - you don't need to prefix those with an underscore and they still won't be routable.

(hangs head in shame) ok not really, but - yeah i thought the underscore prefix for the method name was still a 'convention' for helping to identify private methods in php - and it was including zend in early 2015 - but apparently in late 2015 it was removed in zend and the consensus is now not to use it.

It may still be present in some conventions, CI too denotes non-public methods that way for easier readability.

What I was explaining is that you don't actually need to use it and that he term "private" means a different thing. Smile
Reply


Messages In This Thread
RE: CONTROLLERS, single method or different methods for different actions? - by Narf - 05-12-2016, 01:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB