The Developer Guide's tutorials (Build a Theme, Build a Module) walk you through use cases: build a working theme, build a working plugin, by following one mini-case end-to-end. They cite class names but never enumerate them.

This track does the enumeration. Twenty-three classes, one page each, ordered by area. You land on the page for the class you are about to use, see its full surface, and know whether the next class you need is one click away.

How each page is laid out

Every class page follows the same six sections, in the same order, so you can scan five pages in the time it takes to skim one prose-style document:

  1. Purpose. One sentence on what the class is for. If the sentence does not match what you came here to do, stop reading and search the sidebar.
  2. FQCN + file path. The fully qualified class name and the source path in the Scriptor repo, so you can jump straight to the code.
  3. When to use. The situation that brings you to this class versus a neighbouring one (e.g., addMsg versus flashMsg, Page versus PageRepository).
  4. Surface. Public properties and methods with PHP signatures. Internal helpers and protected hooks meant for subclasses live in a separate "For subclasses" subsection when they exist.
  5. Lifecycle. Who creates it, when, where it lives in the container, what its scope is (request-bound, singleton, per-page, etc.).
  6. Common patterns. One or two short snippets showing the canonical use. No new-feature pitching; just the shape you are going to write.

Pages end with a See also block linking sibling classes, related events, and the tutorial chapters that exercise the class against a real plugin.

What's covered

Twenty-three classes across six areas:

Frontend (7)

The surface a theme author subclasses or calls from templates.

Class Purpose
Site Base class for theme Site subclasses; renders pages, dispatches helpers
Page Read-only page DTO; $site->page in templates
PageRepository Query the page tree (find, byParent, ancestors, walks)
Sanitizer Text / URL / markdown sanitisation for theme code
FrontendNavRegistry Plugin nav-builder collector + sort
NavItem Tree node a plugin contributes to the nav
ImageUrlBuilder Generates image URLs through the processor pipeline

Plugin (5)

The surface a plugin author implements or registers against.

Class Purpose
Plugin Interface every plugin implements
LifecyclePlugin Optional Plugin extension with install() / uninstall() schema hooks
PluginContext Registration surface passed to Plugin::register()
PluginManager Discovery + boot of installed plugins
PluginManifest Composer metadata for a discovered plugin

Editor (3)

The surface a plugin author touches to extend the admin.

Class Purpose
Editor Base class for the admin surface (rarely subclassed; mostly for reference)
Module Interface for editor modules a plugin registers via PluginContext
MenuItem One entry in the editor sidebar or profile menu

Events (6)

PSR-14 events that fire in the frontend request pipeline, plus the two editor-side events for extending the page form.

Event Purpose
PageResolving URL → Page resolution; listener can fill the resolution slot
PageResolved Page resolved; read-only notification
ContentRendering Page HTML rendering; listener can substitute the html slot
RouteNotFound Last-chance resolver before the 404
PageFormRendering Editor: inject inputs into the page form (slots) and hide core fields
PageSaving Editor: persist posted plugin fields into the page's data bag

Logging (1)

Class Purpose
FileLogger PSR-3 logger, container-bound as LoggerInterface

Boot (1)

Class Purpose
App Service-locator accessor for the DI container; the one piece of static state theme _ext.php files lean on

Ordering and PR batching

The reference lands in eleven PRs, grouped by related-class pairs so each PR reviews as a unit. The order is the order in this _index, so the sidebar fills in section by section instead of jumping around.

# PR Classes
1 Frontend: Site Site (anchor of the section, ships alone)
2 Frontend: Page model Page, PageRepository
3 Frontend: small helpers Sanitizer, ImageUrlBuilder
4 Frontend: Nav FrontendNavRegistry, NavItem
5 Plugin: register surface Plugin, PluginContext
6 Plugin: discovery PluginManager, PluginManifest
7 Events: resolution pair PageResolving, PageResolved
8 Events: render / 404 pair ContentRendering, RouteNotFound
9 Editor Editor, Module, MenuItem
10 Logging FileLogger
11 Boot App
12 2.1.0 surface LifecyclePlugin, PageFormRendering, PageSaving

PRs 1–11 are the original twenty classes. PR 12 was added after Scriptor 2.1.0 shipped the plugin install/uninstall lifecycle and the editor page-form events.

The pairings are not rigid. Site is its own PR because it is the biggest page in the track; everything else fits comfortably in a two-or-three-class PR.

What's not in the reference

A reference for plugin authors, not Scriptor's internal contributors. The following are deliberately excluded; the underlying code may be public, but a theme or plugin author has no reason to touch it directly:

  • Editor admin internals: EditorRouter, UserRepository, ProfileModule, PagesModule, AuthModule. Plugins extend the editor through Module + MenuItem registered via PluginContext, not by reaching into the bundled admin code.
  • Internal registries: ModuleRegistry, MenuRegistry. Plugins talk to these through PluginContext's registerModule / registerMenuItem methods; the registries themselves are implementation detail.
  • Listeners shipped by Scriptor: PageCacheInvalidationListener, ItemFileCleanupListener. These are event subscribers, not events themselves; plugins write their own subscribers.
  • CLI tooling: Console, InstallCommand. Ops surface, not programmatic surface.
  • InstallRequiredRenderer: an internal fallback the boot layer reaches for when the install step has not run yet. Plugins and themes never instantiate it.

If you ever need one of these, read the source. The exclusion reflects "no plugin should need to touch this in normal use", not "this code is private".

When the surface changes

This reference tracks the current Scriptor master. When a class gains a public method or an event slot changes type, the page is updated in the same PR that ships the change. Pages carry no version banner; if you are on an older Scriptor, check the file's git history against your install's commit hash.

Where to go next

If you have not built anything yet, the tutorials are a better entry point than the reference:

  • Build a Theme exercises the Frontend surface (Site, Page, PageRepository, Sanitizer, the nav registry) against a real theme.
  • Build a Module exercises the Plugin surface (Plugin, PluginContext, PluginManager) plus theme-level _ext.php hook against a real plugin.

If you are extending an existing theme or plugin, jump straight to the class on the sidebar. Every page tells you which tutorial chapter walks the same class against a working example.


This track lands one PR at a time, in the order in the table above. The first chapter PR (Site) opens immediately after this plan PR merges.