http://www.scottblaine.com/form-validation-callbacks-and-private-functions/ 에서 참조
If you’re familiar with CodeIgniter you probably know about callbacks within form validation. Callbacks allow you to do your own validation of fields. For example, if you want to verify if a username is unique then you could create a username_check function to validate the field. You add the callback rule like this:
And then create a matching function like this:
However, as this is currently implemented someone could access your function as a page at a URL like example.com/index.php/login/username_check/ if they guessed the function name. While that may not have any ill side-effects, it’s probably just as well if no one can access the function besides you.
In come private functions for controllers, which allow you to create a function like this:
And if you try to access the function via a URL, like example.com/index.php/login/_utility/, you’ll get a 404 (page not found).
You probably see where I’m going with this. If you create your callbacks as private functions, no one will be able to access the callbacks as pages. It’s quite simple to do. You add an underscore before your callback function name:
And then add an underscore in your callback rule (note the two underscores after callback):
Done!