Find framework reference pages for handlers, routes, middleware, modules, database, views, and security.

Documentation

Start with what you want to build. This documentation targets CorianderPHP 0.4.1. Existing applications should read the Upgrade Guide: 0.4.0 changed the route/view tree, and 0.4.1 renames framework metadata to $metadata while leaving $page available for application data.

Install The Framework

1

Download

Choose a version from the framework releases, not this documentation repository.

2

Extract

Put the release contents in your application folder.

3

Remove maintenance files

You do not need repository-only .github/, docs/, AGENTS.md, or readme.md to run an app. Keep required license notices when redistributing.

4

Install dependencies

Run composer install, then php coriander nodejs run install.

5

Configure and build

Set local environment values and build assets using the Installation guide.

Create A Page

A fixed page needs one direct GET file. You do not need an action class or a separate forwarding route.

php coriander make:view about

This creates src/Views/about/index.get.php. Put your PHP/HTML there, add optional _metadata.php for the title, and visit /about. The framework supplies inherited layouts.

  • Static View Guide: complete fixed-page example and shared layout.
  • Dynamic View Guide: validated path parameter, prepared data, template, and 404 behavior.
  • Routing: filenames, methods, matching, and route inspection.

Create A Request Handler

A method file returns a callable that accepts the request and returns a PSR response. Small handlers can stay in the file; larger ones can delegate to ordinary app-owned action classes.

There is no controller generator or automatic controller discovery in 0.4.1.

Create An API

Follow the Shelter REST API project for SQLite persistence, GET/POST/PATCH/DELETE routes, validation, and errors. Its playground accepts demonstration writes without changing stored data.

Use Request Handlers for response helpers and parsed bodies. Use Security before exempting a stateless API from CSRF protection.

Use A Database

1

Schema

Create a migration with php coriander make:migration CreatePostsTable.

2

Apply

Run php coriander migrate after configuring SQLite or MySQL.

3

Read and write

Use SQLManager and bound sqlScript() parameters.

4

Reuse

Keep queries in repositories; follow Database Patterns.

The Forum data-model chapter and Shelter data-model chapter show complete schemas.

Add Authentication And Permissions

Authentication identifies a user. Authorization decides what that user may do.

Reference And Operational Guides

Framework Boundary

Keep application code under src, migrations under database, and public assets under public/assets. Do not edit CorianderCore or the coriander CLI; updates manage those files.