API
Every class and method in PhlatPage, read from the code itself.
A cheatsheet of the objects you work with in routers, controllers and templates, and the Toolkit's static helpers. Each name links to its full entry: the signature, parameters, return type and the source line it comes from.
The search box finds methods too: type slug for Str::slug() or children for $page->children().
Most used
objects
A page whose view comes from an addon, resolving its views from the addon folder rather than the site.
The application core.
Boot
Paths
Services
Addons
Views and fields
Pages and users
Responses
Container
Locks
Events
Every item of one collection field - data with no URL of its own, like comments, likes or tags - in a SQLite database at data/collections/{field}.db.
A field definition - its type, label, options and render template.
How one kind of field encodes, decodes, validates and indexes a value.
A field as one record holds it: the value with its definition (type, label, options) and where it lives (context).
One entry of a collection field.
What this request has to say about keeping its response: the page cache's entry, who may share it, and how the response revalidates.
Visitor options the server renders: theme, density, a dismissed banner.
A page on the site.
Identity
Saving
Fields
Drafts
Rendering
Access
Routing
Tree
Children
Files
A RecordCollection of Page objects.
A File that is publicly visible and knows which page it belongs to.
Manages every file owned by a page/item/user - identified by owner UUID + filename - including its index, public mirror, and image variants.
Variants
Paths
Files
Serving
Clearing
Maintenance
A PageFile that is an image. transform() (and the src()/srcset() helpers built on it) only compute the target variant URL and record the requested options via Registry::setVariant() : no pixels are touched here.
A page whose children come from somewhere other than pages/ - an API, a database, a file.
Base for anything stored as an _index.json + _data.json folder (Page, User).
A lazy, immutable list of records.
SQLite index of every page UUID with its path, view, status and timestamps. find() queries it with the comma-separated DSL.
The current HTTP request: path segments, query, post body, uploaded files, and whether htmx sent it.
Holds the routes a view registers for its page, plus before and after hooks.
Session values and flash messages under one name, so views and addons can't overwrite each other's keys.
The visitor's session as `$app->session`: login, the signed-in user, permissions, CSRF and throttling.
A user account.
toolkit
Array helpers: map, filter, find, sort, pluck and friends.
Inspection
Extraction
Transformation
Searching
Sorting
Combination
Terminal output and input for CLI commands: messages, tables, progress bars and prompts.
Color helpers: read any CSS color (#hex, rgb(), hsl() or oklch()) into rgb/hsl, pick a readable text color, lighten and darken.
Conversion
Adjustment
Low-level cookie handling: HttpOnly, SameSite=Lax and Path=/ always, Secure on https.
Read
Write
PDO connection handling and SQL execution, used by the registry.
Directory helpers: list, create, move and delete folders.
Inspection
Path
Contents
Operations
Dates and times: now, parse, format, diff and relative "ago" strings.
Creation
Formatting
Comparison
File helpers: read, write, resolve, copy, symlink and mime type.
Inspection
Path
Read / Write
Operations
Symlinks
Metadata
Runs git commands against a repository: status, add, commit, log, diff and restore.
Repository
Status
Staging & commits
Objects
Branches
Tags
Submodules
Remote
Hashing, password hashing and verification, and random tokens.
Passwords
Tokens
General
Outbound HTTP requests returning an HttpResponse.
Requests
Sets htmx response headers: redirect, location, refresh, push and replace URL, trigger, retarget and reswap.
Navigation
Swap control
Calls a function, matching available values to its parameters by name.
JSON encode and decode.
Signed JSON Web Tokens: RS256 verification against a provider's published keys (its JWKS).
Exclusive file locks that serialize work across PHP processes on one host.
Locking
Writes to the PHP error log - stderr under php-fpm, so it lands in the container logs.
Number helpers: format, round, abs, clamp and friends.
Formatting
Math
Runs a command as a child process, array-form so nothing is interpolated into a shell.
The HTTP response: status code, headers, redirects, and sending html or text.
Status
Redirect
Output
Sanitizes untrusted input into clean text, email, url and similar values.
Strings
Scalars
Network
PHP serialize and unserialize.
Low-level PHP session handling.
Lifecycle
Data
Flash
Read-only access to server and environment values: host, scheme, ip, headers.
Request
Headers
Server
String helpers: case, slug, search, replace, split and join.
Inspection
Extraction
Transformation
Removal
Replacement
Splitting
Comparison
Pattern
Parse, build, encode and decode URLs and query strings.
Parsing
Building
Construction
Inspection
Encoding
Validation rules: required, email, length and more, plus check() to collect errors.
Presence
Format
Length
Range
Comparison
Collector