Introduction
Basic Concepts
Understanding Routing
Intercepting Requests
Module Fundamentals
Database Operations
Templates
Helpers
Form Handling
Form Validation
Working With Files
Image Manipulation
Working With Dates & Times
Language Control
Authorization & Authentication
Helpers Overview
Helpers are single-file collections of pure PHP functions. No classes. No namespaces. No autoloading drama. Just drop-dead simple functions you can call anywhere.
They live in engine/tg_helpers/ and get loaded automatically on every request. Zero effort required.
Trongate's Helper Files
Five files. Zero dependencies.
- Flashdata Helpers ← one-time session messages
- Form Helpers ← building forms without tears
- String Helpers ← text surgery & sanitization
- URL Helpers ← links, redirects, segments and more
- Utilities Helpers ← everything else you need
How to Use Them
Just call the functions. Anywhere. Anytime.
Example #1
Here's an example of how to redirect a user to a login page, using Trongate's redirect() helper:
redirect('login');
Example #2
The code below demonstrates how to using Trongate's form_button() helper. This kind of code would typically be written inside a view file:
echo form_button('submit', 'Submit');
Why Helpers Beat "Modern" Alternatives
- No includes. No config. No drama.
- No Composer = runs forever
- No classes = no instantiation overhead
- No namespaces = no
usestatements - No service containers = no brain damage
For a technical, no-bs breakdown of everything that's included with Trongate's helpers, check out the Helpers Reference Guide.