Index

DocParam

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

class

DocParam

DocParam.php:8

One parameter of a function/method, or one attribute of a custom element -- whatever the language, a name, a type, an optional default and a description.

class MMO\doc\models\DocParam extends MMO\doc\models\DocNode
Namespace
MMO\doc\models
Extends
DocNode

Methods3

signature($withType)

DocParam.php:29
function signature(bool $withType = true): string
$withType = truebool
returnsstringthe parameter as it appears in a signature, e.g. string ...$parts = [].
Inherited members (21)
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
isEmpty()DocNode
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