Surface
What a route serves, said in fields instead of prose (greenhouse decisions/0567 §2, slice BV-2). Measured (greenhouse evidence/1101): a resident read the contract of `make`, found no word for a page, and chose «a controller that concatenates HTML» — the cheap path never asked what the route returns. `make` now asks, and answers with this block: `kind` is `visual` (a page a visitor reads), `data` (an API) or `undeclared` (the author has not said, and nothing is scaffolded until they do). A VISUAL SURFACE IS A SCREEN, AND `make` CANNOT DECLARE ONE. The screen store lives in the app runtime, which this package does not know and must not write around (a second writer of `config/screens.json` would be a second authority over what a declaration is). So a page is answered with {@see next()}: the exact `screen:declare` call to run, the way a trial answers with `to_apply`.
Surface::route()
public static function route(string $typed): stringA literal route as HTTP writes it — `/blog` — from what a caller typed (`blog`, `/blog/`).
Parameters
| Name | Type | Description |
|---|---|---|
| $typed | string |
Throws
\InvalidArgumentException naming what is wrong with it
Surface::key()
public static function key(string $route): stringWhat two spellings of one route share: no slash at either end, no case.
Parameters
| Name | Type | Description |
|---|---|---|
| $route | string |
Surface::visual()
public static function visual(string $route, string $screen, bool $declared): arrayThe block for a page: a visual surface whose governed authoring is a screen.
Parameters
| Name | Type | Description |
|---|---|---|
| $route | string | |
| $screen | string | |
| $declared | bool |
Surface::undeclared()
public static function undeclared(string $route): arrayThe block for a controller whose author has not said what its GET route returns.
Parameters
| Name | Type | Description |
|---|---|---|
| $route | string |
Surface::data()
public static function data(string $route): arrayThe block for a controller that answers data.
Parameters
| Name | Type | Description |
|---|---|---|
| $route | string |
Surface::next()
public static function next(string $screen, string $route, string $plugin, string $entity, array $columns): arrayThe call that declares the page: `screen:declare`, with every argument filled. Two columns or more read as entries — the first is the title, the second the body, the rest are named beside them (`content`). One column is a list (`data-table`): a readable entry needs a title AND a body.
Parameters
| Name | Type | Description |
|---|---|---|
| $screen | string | |
| $route | string | |
| $plugin | string | |
| $entity | string | |
| $columns | list<string> | the entity fields the page shows, in order |