MMOframework
Pourquoi l'IA Playground Bibliothèques Documentation Rechercher Agence
FR EN
Index

MMO\doc

MMO\doc · 20 symboles · générée le 27 Oct 2026

function

addSearchSource

bootstrap.php:232

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
Espace de noms
MMO\doc
The first call wins: [`DocPageController`](https://mmoframework.fr/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
retournevoid
Graphe d'appels
function

anchor

functions.php:15

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

function anchor(string $name): string
Espace de noms
MMO\doc
Every renderer goes through this one function, so a link built by [`MarkdownPrinter`](https://mmoframework.fr/fr/documentation/mmo.doc/php/MarkdownPrinter.md#markdownprinter) and one built by [`DocPageController`](https://mmoframework.fr/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
retournestringe.g. mmocoreserverroute, mmo-core-map, route-geturi, content
\MMO\doc\anchor('Route::getUri'); // 'route-geturi'
Graphe d'appels
function

buildDocumentation

build.php:33

Build the code documentation of $names with mmo.doc, into each library's own documentation folder: docs/php/ from the reflection of its loaded php, docs/js/ from its parsed javascript and .jhs -- a .md page and its .doc.json model per file, and an index.json. Every library's git ignores them; a phar carries them (PackageManifest::build takes its documentation folders whole).

function buildDocumentation(?array $names = null, ?callable $log = null): bool
Espace de noms
MMO\doc
What an earlier run generated is removed first: the generators never remove a page, and the index keeps every symbol it ever saw, so a class deleted since would still be documented. Only what git ignores in those folders is removed -- a file a library commits there is left alone -- and nothing is removed unless everything can be. The libraries must be loaded (the php generator documents what reflection sees), so this runs in a script that loaded the project, not in a request. `{bin}` is moved to a temporary folder: Documentor wires itself into mmo.client when it is built, which would write prism.js and mmo.doc.css into the project's own.
$names = nullnull | arraythe libraries, every one the project packages when null (its includes, minus itself)
$log = nullnull | callable
retourneboolfalse when a generator failed: what it was building is incomplete
lèvewhen a name is not a library the project packages
lèvewhen an earlier run's files cannot be replaced (they belong to another user, the web server's through mmo.doc's control panel): nothing was removed, and the message says how to give them back
\MMO\doc\buildDocumentation(['mmo.core'], fn($line) => print("$line\n")); // true
Graphe d'appels
function

compileDocumentationCss

bootstrap.php:277

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
Espace de noms
MMO\doc
It is Simple CSS, compiled by [`SCSCompiler`](https://mmoframework.fr/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.
retournenull | stringthe absolute compiled filename, or null when nothing has been built yet
Graphe d'appels
function

connectPageRoutes

bootstrap.php:294

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

function connectPageRoutes(): void
Espace de noms
MMO\doc
retournevoid
Graphe d'appels
function

connectReadOnly

bootstrap.php:190

Serve the documentation to readers, and nothing else: for a public site (www.mmoframework.fr) rather than a developer's checkout. documentation is the index of everything documented, documentation/mmo.core/php/server/Route.md a page of it, under a bar searching every symbol (doc/search).

function connectReadOnly(): void
Espace de noms
MMO\doc
Only what reads: the page tree, its renderer and the search. Call it INSTEAD of [`Documentor::Shared()`](https://mmoframework.fr/fr/documentation/mmo.core/php/classes/aModule.md#amodule-shared), which also connects the control panel (`tools/mmo/doc`: anyone could regenerate the documentation) and the example runner (`doc/example/run`, which runs code), and puts the panel in the menu. Needs mmo.client. The menu lists the documentation and its libraries, not the thousand pages under them, which every page of the site would carry: they stay reachable from the index, the search and a library's page. A scaffolding template (`{{name}}`) documents no library and is hidden. Like [`connectToClient()`](https://mmoframework.fr/fr/documentation/mmo.doc/php.md#connecttoclient), call it once, before the first request is routed.
retournevoid
\MMO\app([...]); \MMO\doc\connectReadOnly(); \MMO\run();
Graphe d'appels
function

connectRoutes

bootstrap.php:289

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

function connectRoutes(): void
Espace de noms
MMO\doc
retournevoid
Graphe d'appels

Utilisé par (1)

function

connectToClient

bootstrap.php:143
function connectToClient(): void
Espace de noms
MMO\doc
retournevoid
Graphe d'appels
function

copyPrismAsset

bootstrap.php:252

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
Espace de noms
MMO\doc
retournenull | stringthe absolute copied filename, or null if mmo.client (or its vendored prism) isn't there.
Graphe d'appels
function

directImplementations

functions.php:59

Get the direct interfaces implemented by a class

function directImplementations(ReflectionClass|string $ref): array
Espace de noms
MMO\doc
$refReflectionClass | stringthe classname or its reflection
retournearraya list of interfaces name
lève
Graphe d'appels
function

directUses

functions.php:40

Get the direct trait implemented by a class

function directUses(ReflectionClass|string $ref): array
Espace de noms
MMO\doc
$refReflectionClass | stringthe classname or its reflection
retournearraya list of traits name
lève
Graphe d'appels
function

generatedFiles

build.php:120
function generatedFiles(string $folder, string $library): array
Espace de noms
MMO\doc
$folderstring
$librarystring
retournearraywhat an earlier run generated in $folder, a library's documentation folder: php/, js/ and their php.md/js.md summaries, and only the files the library's git ignores (none when it is no checkout)
Graphe d'appels

Utilise (1)

Utilisé par (1)

function

includeDocumentation

bootstrap.php:65

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
Espace de noms
MMO\doc
If mmo.client is included, this function is attached to PageContents signal.
$contentsPageContents
retournevoid
Graphe d'appels
function

isInNamespaces

functions.php:26

Check if a namespace is inside a list of other namespaces

function isInNamespaces(string $namespace, ?array $namespaces): bool
Espace de noms
MMO\doc
$namespacestringthe namespace to test
$namespacesnull | arraythe list of available namespaces. If null, always return true.
retournebool
Graphe d'appels
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
Espace de noms
MMO\doc
$textstringmarkdown
$seesarraythe resolved references, keyed by target (seeTargets), as the reflector stores them in a node's sees
$hrefcallable
retournestring
\MMO\doc\linkSees('(@see stop)', ['stop' => ['url' => 'https://x']], fn($r) => $r['url']); // '([`stop`](https://x))'
Graphe d'appels
function

lockedFiles

build.php:148
function lockedFiles(string $folder): array
Espace de noms
MMO\doc
$folderstring
retournearraywhat of an earlier run in $folder cannot be replaced: a file, or a folder whose entries cannot be removed. Written by another user -- the web server, through mmo.doc's control panel (tools/mmo/doc).
Graphe d'appels

Utilise (1)

Utilisé par (1)

function

seeLabel

functions.php:167
function seeLabel(string $target): string
Espace de noms
MMO\doc
$targetstring
retournestringhow a @see target reads once linked: its short name, Route::stop() for \MMO\core\server\Route::stop(), anchor for \MMO\doc\anchor.
Graphe d'appels

Utilisé par (1)

function

seeParts

functions.php:157
function seeParts(string $target): array
Espace de noms
MMO\doc
$targetstring
retournearraythe names a a/b target lists, or [] when it is a single name, a url or a path.
Graphe d'appels

Utilisé par (2)

function

seeTarget

functions.php:144
function seeTarget(string $raw): string
Espace de noms
MMO\doc
$rawstring
retournestringa raw @see target without the punctuation of the sentence it ends (stop). → stop).
Graphe d'appels

Utilisé par (2)

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
Espace de noms
MMO\doc
$textstring
retournearraythe targets, as written
\MMO\doc\seeTargets('Run it (@see Route::stop, @see a/b).'); // ['Route::stop', 'a', 'b']
Graphe d'appels

Utilisé par (1)