i have a class like this:
class Asd{
function index(){
$this->doSomenthing();
}
function doSomenthing(){
}
}
i’m using codeigniter so doSomenthing == http://www.site.com/asd/dosomenthing;
i would like to leave that method as “private” it can be used but not accessed by http requests, it should be used only from the other methods inside the class.
Does i need to declare that method as private function doSomenthing(){} ?
you can prefix the “doSomething”-method with an underscore. That way it wont be accessed via the URL request.
http://codeigniter.com/user_guide/general/controllers.html#private