The Trongate Class
This is the foundation class for all Trongate controllers. It provides essential functionality including view rendering, dynamic module loading, lazy instantiation of framework classes, and support for both parent and child module architectures. Every controller in a Trongate application extends this base class.
__construct()
Constructor for the Trongate base controller. Sets the module name for the current controller instance. If no module name is provided, auto‑detects from the class name (e.g., a class named Products becomes module products).
read_manifest()
Reads a manifest.php file from the specified application-relative path and returns its contents as an array. If no manifest file exists at the given path, returns false.
view()
Loads and renders a view file from the current (or specified) module's views/ directory. By default, the view is output directly to the browser. Pass true as the third argument to return the rendered output as a string instead.