Index

DocType

MMO\doc\models · 1 symbol · generated 30 Sep 2026

class

DocType

DocType.php:17

One rendered type expression, already resolved: the display text plus, for every atom of it, where that atom is documented. Types are resolved once, at generation time (the generator has the reflection/parser context needed to know that Route means MMO\core\server\Route and where its page is) so that both renderers only ever have to print what is already here.

class MMO\doc\models\DocType extends MMO\doc\models\DocNode implements Stringable
Namespace
MMO\doc\models
Extends
DocNode
Implements
Stringable
``` ['text' => '?Route', 'separator' => '|', 'parts' => [ ['name' => 'null', 'short' => 'null', 'url' => 'https://www.php.net/...'], ['name' => 'MMO\core\server\Route', 'short' => 'Route', 'url' => 'documentation/mmo.core/php/server/Route.md#route'], ]] ```

Methods5

isEmpty()

DocType.php:34
function isEmpty(): bool
returnsbooltrue when there is nothing at all to print.

part($name, $short, $url)

DocType.php:28
function part(string $name, ?string $short = null, ?string $url = null): static
$namestringthe fully qualified (or primitive) type name
$short = nullnull | stringthe name as it should be displayed (defaults to the last \ segment)
$url = nullnull | stringwhere that type is documented, if anywhere
returnsstatic$this, for chaining

text()

DocType.php:39
function text(): string
returnsstringthe display text, rebuilt from the parts when it was not given explicitly.
Inherited members (20)
PropertiesDeclared byDescription
contentDocNode
nodeCacheDocNode
MethodsDeclared byDescription
add($key, $node)DocNodeAppend a child node under $key.
clear()DocNodeEmpty the underlying content, keeping the object itself.
compact()DocNodeDrop every key whose value is null, '' or [] -- keeps the generated json readable and small.
count()DocNode\Countable::count
Flatten($value)DocNode
get($key, $default)DocNodeRead a key, without the "undefined array key" notice $node['missing'] would raise (tArray::offsetGet returns by reference, so it cannot null-coalesce on its own).
getIterator()DocNode\IteratorAggregate::getIterator
jsonSerialize()DocNode
keys()DocNode
loadArray($data)DocNodeLoad every entry of a plain array into the content, through offsetSet (so any offsetSet() override defined by the class using this trait, e.g.
nodes($key, $class)DocNodeRead a key as a list of child nodes, rebuilding each one into $class if it is still a plain array (which is what it is right after json_decode).
offsetExists($key)DocNode\ArrayAccess::offsetExists
offsetGet($key)DocNode\ArrayAccess::offsetGet
offsetSet($key, $value)DocNodeStore a value, dropping whatever nodes had already rebuilt for that key.
offsetUnset($key)DocNode\ArrayAccess::offsetUnset -- on a list (sequential integer keys, as produced by $bag[] = ...), the element is spliced out (closing the gap and reindexing), matching \unset() semantics on a plain …
storeValue($key, $value)DocNode\ArrayAccess::offsetSet -- a null $key appends ($bag[] = $value), like a plain PHP array.
toArray()DocNodeRecursively convert to plain arrays.
__construct($data)DocNode