Let’s say I have a User_RegistrationController from with I want to extend in another module like so:
class Clinic_RegisterController extends User_RegisterController
but I’ve PHP error for that:
( ! ) Fatal error: Class 'User_RegisterController' not found /application/modules/clinic/controllers/RegisterController.php on line 4
Is there any way to extend a controller from another module?
You could pull your base controller into into a separate library class:
Then the controller in module
foocould be empty:while the controller in module
barcould contain your overrides:Don’t forget the add
App_as anautoloadernamespace.