Index

Declaration

MMO\admin\helpers · 1 symbol · generated 5 Oct 2026

class

Declaration

Declaration.php:22

What every key of deploy.json means, and a declaration that says it: every key of every server and target written, at its default when nobody chose it, each one with a comment saying what it does.

class MMO\admin\helpers\Declaration
Namespace
MMO\admin\helpers
`deploy.json` decides where releases go, and it is reviewed like code: a key left out still has a value -- the entity's default -- which the reader has to know, or look up. So [`SetupWizard`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/SetupWizard.md#setupwizard) writes them all, in the order below, and comments each one that has no comment yet. A comment already there is the file's own: it is never replaced. The lists below are the one place these comments are written, and a test holds them to the entities: a key an entity gains without a comment here fails it.
$data = Declaration::Complete($data); // every key, before JsonEditor::update() Declaration::Document($json); // then a comment on each key that has none

Index

PROJECTkey of a project of projects => what it is, in the order written.
ROOTkey of the file => what it is.
SECTIONSsection => [the entity its entries are, what each of their keys is].
SERVERkey of a server => what it is, in the order written.
TARGETkey of a target => what it is, in the order written.
Complete($data) static
DefaultValue($class, $key) static
Document($json) staticComment every key of the declaration that has no comment: its sections, their entries, and every key of those.
Entry($section) static
Explain($json, $path, $text) staticComment the key at $path, when it is there, has no comment yet and has a line of its own.

Constants5

PROJECT

key of a project of projects => what it is, in the order written.

const PROJECT = […8 items]

ROOT

key of the file => what it is.

const ROOT = […4 items]

SECTIONS

section => [the entity its entries are, what each of their keys is].

const SECTIONS = […3 items]

SERVER

key of a server => what it is, in the order written.

const SERVER = […10 items]

TARGET

key of a target => what it is, in the order written.

const TARGET = […21 items]

Methods5

Complete($data)

staticDeclaration.php:95
static function Complete(array $data): array
$dataarraya declaration, decoded.
returnsarray$data with every key of every project, server and target: the ones it has, where they are in the order above, and the default of each one it lacks. A key this class does not know stays, after them: a comment key, or a typo Store refuses.

DefaultValue($class, $key)

staticDeclaration.php:147
static function DefaultValue(string $class, string $key): mixed
$classstring
$keystring
returnsmixedwhat $class's property $key is when nothing sets it -- written {} when it is a map.

Document($json)

staticDeclaration.php:118

Comment every key of the declaration that has no comment: its sections, their entries, and every key of those.

static function Document(MMO\admin\helpers\JsonEditor $json): MMO\admin\helpers\JsonEditorA key sharing its line with another cannot have a comment of its own: its object is written one key per line first ([`JsonEditor::unfold`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/JsonEditor.md#jsoneditor-unfold)).
$jsonJsonEditor
returnsJsonEditor$json

Entry($section)

staticDeclaration.php:153
protected static function Entry(string $section): string
$sectionstring
returnsstringwhat an entry of $section is -- not naming it: renamed, it would say a name it no longer has.

Explain($json, $path, $text)

staticDeclaration.php:162

Comment the key at $path, when it is there, has no comment yet and has a line of its own.

protected static function Explain(MMO\admin\helpers\JsonEditor $json, array $path, string $text): void
$jsonJsonEditor
$patharray
$textstring
returnsvoid