Tiny PHP Framework

Home Getting Started Core Concepts Helpers Extensions Repo

Core Concepts

The conceptual tour of the framework. Read these in order if you’re new to Tiny.

Architecture

  1. MVC architecture — how Tiny implements Model-View-Controller, and the request lifecycle.

Request handling

  1. Routing — the filesystem-based router, 3-segment URL resolution, and the fallback algorithm.
  2. ControllersTinyController, HTTP-verb dispatch, request/response helpers.
  3. Request & Response — the full TinyRequest / TinyResponse API reference.
  4. Middleware — pre-controller hooks (auth, CORS, logging, rate limiting).

Views

  1. Views — templates, components, layouts, asset helpers.
  2. HTMX & React — built-in HTMX awareness and React SSR/SPA rendering via tiny::renderReact().

Data

  1. ModelsTinyModel, schema validation, caching patterns.
  2. Database — raw-SQL helpers for MySQL, PostgreSQL, SQLite.

Testing

  1. Testing — built-in zero-ceremony test harness, tiny::swap(), tiny::test(), TinyTestResponse, :memory: SQLite.

See also