The Model Class
This core engine class provides the foundation for data operations in Trongate v2. The Model class automatically handles database connections (both default and alternative database groups), enables explicit module loading within model files, and delegates method calls to module-specific model files. All module model files (e.g., Users_model.php) extend this base class to inherit its functionality.
Most of the code within the Model class is for internal framework bootstrapping. From within model files, the only Model class method you'll typically call directly is module().
Related Documentation:
module()
Loads a module and makes it available as a property within model files. This method locates the module's controller file, requires it, instantiates the controller class, and caches the instance in the loaded_modules array. Once loaded, the module can be accessed as $this->module_name.