What Is A Controller?
A ‘controller’ is a file that contains business logic. In the case of the Trongate Framework, this means a PHP file that contains some sort of code for controlling how the application works.
Consider the structure of a module.
All of the modules inside a Trongate app will contain a folder called 'controllers'. Normally (though not always) the controllers folder will contain one PHP file. This PHP file will be the controller for the module. You can think of the controller as being the brains of the module.
Below are some features that all Trongate controller files have in common:
- Controller files always share the same name as the module that they belong to.
- Controller file names always have an uppercase first character.
- Controller files always contain a class that extends the main 'Trongate' class.
HELP & SUPPORT
If you have a question or a comment relating to anything you've see here, please goto the Help Bar.