Index

MMO\doc

MMO\doc · 16 symbols · generated 30 Sep 2026

function

addSearchSource

bootstrap.php:183

Makes the documentation searchable from <mmo-app>'s command palette, the one search box of the application: the search endpoint (SearchController::routeSearch) is declared in MMO.config.searches, and the palette lists what it answers under its own heading, next to the pages and the commands.

function addSearchSource(MMO\core\documents\Document $document, ?string $page = null): void
Namespace
MMO\doc
The first call wins: [`DocPageController`](https://mcp.mmoframework.fr/documentation/mmo.doc/php/controllers/DocPageController.md#docpagecontroller) calls it first with the page the reader is on, so what is documented on that page comes first; the listener every html page goes through only adds it when missing.
$documentDocumentanything but an html document is left alone
$page = nullnull | stringthe page path the reader is on (mmo.core/php/server/Route.md), or a folder of pages
returnsvoid
Call graph
function

anchor

functions.php:15

The canonical in-page anchor for a symbol or member name.

function anchor(string $name): string
Namespace
MMO\doc
Every renderer goes through this one function, so a link built by [`MarkdownPrinter`](https://mcp.mmoframework.fr/documentation/mmo.doc/php/MarkdownPrinter.md#markdownprinter) and one built by [`DocPageController`](https://mcp.mmoframework.fr/documentation/mmo.doc/php/controllers/DocPageController.md#docpagecontroller) always agree: lowercased, namespace/path separators and sigils dropped, anything else that is not a letter, a digit or a `-` folded into a `-`.
$namestringe.g. MMO\core\server\Route, MMO.core.Map, Route::getUri, $content
returnsstringe.g. mmocoreserverroute, mmo-core-map, route-geturi, content
\MMO\doc\anchor('Route::getUri'); // 'route-geturi'
Call graph
function

compileDocumentationCss

bootstrap.php:228

Compiles src/styles/documentation.scs to {bin}/mmo.doc.css, recompiling only when the source is newer (dev mode only -- like MMO\client\Theme's own asset jobs, a production deploy is expected to build this ahead of time).

function compileDocumentationCss(): ?string
Namespace
MMO\doc
It is Simple CSS, compiled by [`SCSCompiler`](https://mcp.mmoframework.fr/documentation/mmo.client/php/SCSCompiler.md#scscompiler) with `emitThemes` off: the design tokens are already declared on `:root` by the app's own `mmo.client.css`, and this stylesheet only *references* them, so a theme switch reaches the documentation pages like any other page.
returnsnull | stringthe absolute compiled filename, or null when nothing has been built yet
Call graph
function

connectPageRoutes

bootstrap.php:245

Registers the html documentation renderer, which only makes sense once mmo.client provides the page tree.

function connectPageRoutes(): void
Namespace
MMO\doc
returnsvoid
Call graph

Used by (1)

function

connectRoutes

bootstrap.php:240

Registers this package's controllers as routes (connect).

function connectRoutes(): void
Namespace
MMO\doc
returnsvoid
Call graph
function

connectToClient

bootstrap.php:142
function connectToClient(): void
Namespace
MMO\doc
returnsvoid
Call graph
function

copyPrismAsset

bootstrap.php:203

Copies mmo.client's vendored vendor/prism/prism.js (a Prism.js build already bundling the markup/js/scss/ css/markdown/php grammars) out to {bin}/prism.js, so it's actually servable -- Theme's own asset pipeline never picks up files under a package's vendor/ folder. Only copies when missing/stale.

function copyPrismAsset(): ?string
Namespace
MMO\doc
returnsnull | stringthe absolute copied filename, or null if mmo.client (or its vendored prism) isn't there.
Call graph
function

directImplementations

functions.php:59

Get the direct interfaces implemented by a class

function directImplementations(ReflectionClass|string $ref): array
Namespace
MMO\doc
$refReflectionClass | stringthe classname or its reflection
returnsarraya list of interfaces name
throws
Call graph
function

directUses

functions.php:40

Get the direct trait implemented by a class

function directUses(ReflectionClass|string $ref): array
Namespace
MMO\doc
$refReflectionClass | stringthe classname or its reflection
returnsarraya list of traits name
throws
Call graph
function

includeDocumentation

bootstrap.php:64

Include the documentation in the html response This function is added as a job in the application.

function includeDocumentation(MMO\client\events\PageContents $contents): void
Namespace
MMO\doc
If mmo.client is included, this function is attached to PageContents signal.
$contentsPageContents
returnsvoid
Call graph
function

isInNamespaces

functions.php:26

Check if a namespace is inside a list of other namespaces

function isInNamespaces(string $namespace, ?array $namespaces): bool
Namespace
MMO\doc
$namespacestringthe namespace to test
$namespacesnull | arraythe list of available namespaces. If null, always return true.
returnsbool
Call graph
function

linkSees

functions.php:112

Replace every @see reference of a markdown text with a link to its target, or with inline code when the target is documented nowhere. Fenced code blocks are left alone.

function linkSees(string $text, array $sees, callable $href): string
Namespace
MMO\doc
$textstringmarkdown
$seesarraythe resolved references, keyed by target (seeTargets), as the reflector stores them in a node's sees
$hrefcallable
returnsstring
\MMO\doc\linkSees('(@see stop)', ['stop' => ['url' => 'https://x']], fn($r) => $r['url']); // '([`stop`](https://x))'
Call graph
function

seeLabel

functions.php:167
function seeLabel(string $target): string
Namespace
MMO\doc
$targetstring
returnsstringhow a @see target reads once linked: its short name, Route::stop() for \MMO\core\server\Route::stop(), anchor for \MMO\doc\anchor.
Call graph

Used by (1)

function

seeParts

functions.php:157
function seeParts(string $target): array
Namespace
MMO\doc
$targetstring
returnsarraythe names a a/b target lists, or [] when it is a single name, a url or a path.
Call graph
function

seeTarget

functions.php:144
function seeTarget(string $raw): string
Namespace
MMO\doc
$rawstring
returnsstringa raw @see target without the punctuation of the sentence it ends (stop). → stop).
Call graph
function

seeTargets

functions.php:90

Every target the @see references of a text point at, cleaned of the punctuation the sentence around it glued on (@see stop., (stop)), and split when several are written as one (@see getFilename/getUrl).

function seeTargets(string $text): array
Namespace
MMO\doc
$textstring
returnsarraythe targets, as written
\MMO\doc\seeTargets('Run it (@see Route::stop, @see a/b).'); // ['Route::stop', 'a', 'b']
Call graph