Welcome Guest, Not a member yet? Register   Sign In
Controllers: private functions
#1

[eluser]Unknown[/eluser]
My question is about private functions used in controllers.

The User Guide states that adding underscore before the name of that function makes the function private, and it won't be accessible via URI:

Code:
private function _somefunction ($first_parameter, $second_parameter) { etc.

And yet, on the same page of the User Guide ("Controllers") there's this example:

Code:
public function _remap ($method) {

Why is the function marked with underscore is declared as public - am I missing something? Is declaring function as public overrules the underscore in its name, or is there any other reason for that? Or perhaps, it's an error in the User Guide?

Thank you!


Messages In This Thread
Controllers: private functions - by El Forum - 02-22-2013, 03:10 PM
Controllers: private functions - by El Forum - 02-22-2013, 04:42 PM
Controllers: private functions - by El Forum - 02-22-2013, 04:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB