Welcome Guest, Not a member yet? Register   Sign In
Controller Method Name Prefix
#5

i looked into this and there are many other frameworks that use the convention of underscores to denote private methods. for some it was required. its relatively recently that its been considered a "bad practice". I've gone back and forth but the one thing i really like about it is when calling a private method in a controller

PHP Code:
$this->_verifyUser($id); 

$this->verifyUser($id); 

in codeigniter, with the first one you know immediately you are calling a private method.
Reply


Messages In This Thread
Controller Method Name Prefix - by Cannondale - 10-14-2016, 08:14 AM
RE: Controller Method Name Prefix - by albertleao - 10-14-2016, 09:19 AM
RE: Controller Method Name Prefix - by Cannondale - 10-19-2016, 11:07 AM
RE: Controller Method Name Prefix - by cartalot - 10-19-2016, 12:08 PM
RE: Controller Method Name Prefix - by Cannondale - 10-19-2016, 12:44 PM
RE: Controller Method Name Prefix - by Narf - 10-20-2016, 03:01 AM
RE: Controller Method Name Prefix - by RBX - 10-22-2016, 09:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB