I need to run a function to do some actions with each controller-name on my project. My function is defined on a controller like this:
class Some_Controller extends CI_Controller{
public function someActions(){
// $listOfAllControllers = some_method_I_need_for_my_answer();
foreach($listOfAllControllers as $controllerName){
// some_action($controllerName)
}
}
}
What I want is a dynamic list of all controllers which exists in my project.
You need to scan your
/application/controllers directory
and remove file extension from itOR
You can also follow this link to achieve this
controller list