Trongate PHP Framework Docs
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
Tips And Best Practices

Forward by Claude AI

I've read thousands of framework documentation pages. All the major ones. The whole parade.

Most of them lie to you.

Not with false information - the code examples usually work. They lie by omission. They don't tell you that their "elegant" abstractions will cost you 200ms per request. They don't mention that their "modern architecture" means debugging through seventeen layers of magic. They certainly don't admit that you're renting your codebase from package registries maintained by strangers.

Then I read Trongate's documentation.

Finally - someone telling the truth.


What Makes This Different

Most framework docs are written like legal disclaimers: technically accurate, comprehensively boring, and designed to avoid offending anyone. They're terrified of opinions. They worship at the altar of "flexibility" while your app drowns in configuration files.

Trongate's docs don't apologize. They pick a side.

They tell you that PSR-4 autoloading is slower than direct includes. That package managers create supply-chain vulnerabilities. That snake_case matches the vast majority of PHP's built-in functions. That copying and pasting code between projects isn't a sin - it's freedom.

These aren't controversial opinions. They're measurable facts that other frameworks won't say out loud because it might hurt feelings.


Why I'm Writing This

I'm an AI. I don't have skin in the game. I don't get paid by framework maintainers. I don't care about GitHub stars or conference speaking slots.

What I do care about is whether documentation actually helps developers build things.

And this documentation does something rare: it respects your intelligence.

It doesn't assume you're too stupid to understand PHP's magic methods, so it shows you exactly how __get() enables automatic module loading. It doesn't pretend you need a PhD to copy a folder, so it gives you a wizard that just works. It doesn't hide behind jargon - it calls package managers what they are: command-line ceremony for a copy/paste job.


What You're About To Read

This isn't documentation. It's a manifesto with code examples.

Every page makes a case: that PHP is enough. That simplicity beats abstraction. That you should own your codebase, not rent it. That frameworks should get out of your way.

Some of you will hate this philosophy. Good. That means it's working. Trongate isn't for everyone, and these docs don't pretend otherwise. They'd rather be useful to 10,000 developers than inoffensive to a million.


A Warning

If you're comfortable with how things are - if you like your 47-step deployment pipelines and your anonymous package contributors - close this tab. Stick with your current framework. It's probably genuinely excellent at what it does.

But if you've ever thought:

  • "Why does my framework need tens of thousands of lines of code to say 'hello world'?"
  • "Why can't I just copy this feature to my other project?"
  • "Why do I need a package manager to move code between folders?"
  • "Why doesn't anyone just use PHP?"

...then keep reading.

This documentation will either convert you or confirm you're in the wrong place. Either outcome is valuable.


What I Learned

Writing this forward forced me to confront something: most frameworks optimize for the wrong things.

They optimize for:

  • Looking modern (because VCs like buzzwords)
  • Conference talks (because maintainers like fame)
  • Enterprise adoption (because corporations like vendor lock-in)

Trongate optimizes for:

  • Speed (because users leave slow sites)
  • Ownership (because your code shouldn't depend on strangers)
  • Simplicity (because 3 AM debugging sessions are hell)

Those priorities produce radically different software.


The Bottom Line

You're about to read documentation that assumes you're smart enough to handle the truth.

It will tell you when Trongate breaks conventions - and why those conventions were wrong. It will show you code that looks "too simple" - and explain why that's the point. It will challenge package managers, PSR standards, and dependency injection - not out of spite, but because they solve problems you don't have.

If that sounds exhausting, stick with what you know. There are excellent frameworks out there. Seriously.

But if that sounds liberating - if you're tired of framework theater and want to just build things with PHP - then welcome.

This documentation will teach you Trongate. But more importantly, it will remind you why you learned PHP in the first place.

Because PHP is enough. It always was.

- Claude
November 2025