DeveloperShellController
MMO\admin\controllers · 1 symbole · générée le 27 Oct 2026
DeveloperShellController
DeveloperShellController.php:29The developer mode from the command line (DeveloperController, DeveloperMode):
- Espace de noms
MMO\admin\controllers- Étend
- aShellController
- Voir
ROLESon this instance (mmo.oauth), and gives them to users: run it on every project, every server; -developer pages [--write]gives the board's tickets theirpagesfrom what already names them; -developer pull --target=dev [--remote=<git url>] [--dry-run]brings a server's inbox onto the board of this machine; -developer test-accounts [--checklist=<name>] [--dry-run]makes the test accounts of the checklists' profiles (recipe.accounts,TestAccounts) this machine's database lacks; -developer test-data [--checklist=<name>] [--dry-run] [--archive]makes the test records of the checklists (recipe.testData,TestData) in this machine's database, or archives them.-manswers in json.
Index
| ROLES | The roles of the developer mode: label => [description, scopes, modes]. | |
| groupsCollection | ||
| testAccountsFile | ||
| testDataFile | ||
| testDataRepository | ||
| developer() | ||
| json($route, $report) | ||
| recipes($only) | ||
| remoteOf($name, $folder) | The server's inbox of a target of deploy.json: ssh://{alias}{shared}/{folder}, the folder ({db}/developer) read in its shared paths (db is one). | |
| route_pages($route) | ||
| route_pull($route) | ||
| route_roles($route) | ||
| route_test_accounts($route) | Make the test accounts of the checklists' profiles (recipe.accounts) this machine's database lacks: their roles, their groups, no password anyone knows -- they are opened by « Changer de compte »… | |
| route_test_data($route) | Make the test records of the checklists (recipe.testData, TestData): what each test account must see in its perimeter and must not see outside it, labelled TEST CLAUDE …, made through the … | |
| testDataRecipe($only) | ||
| testDataRefusal($repository, $collections, $database, $mode, $config) | Why test records may not be made: every collection they are made in -- and the accounts' -- must be in this machine's own database, the one configs/config.json declares, in development (Test… | |
| testDifferences($user, $profile) | ||
| testGroups($user, $labels, $collection, $line) | ||
| testProfiles($only) |
Constantes1
ROLES
The roles of the developer mode: label => [description, scopes, modes]. A role's scopes not named here are left as they are (an administrator may have added some); the ones named are set.
Propriétés4
groupsCollection
- Type
- string
testAccountsFile
- Type
- string
testDataFile
- Type
- string
testDataRepository
- Type
- string
Méthodes14
developer()
DeveloperShellController.php:448| retourne | DeveloperController | the application's |
json($route, $report)
DeveloperShellController.php:455recipes($only)
DeveloperShellController.php:370remoteOf($name, $folder)
DeveloperShellController.php:426The server's inbox of a target of deploy.json: ssh://{alias}{shared}/{folder}, the folder ({db}/developer) read in its shared paths (db is one).
route_pages($route)
DeveloperShellController.php:386route_pull($route)
DeveloperShellController.php:396route_roles($route)
DeveloperShellController.php:45route_test_accounts($route)
DeveloperShellController.php:100Make the test accounts of the checklists' profiles (recipe.accounts) this machine's database lacks: their roles, their groups, no password anyone knows -- they are opened by « Changer de compte » (the checklists' « Open as »).
route_test_data($route)
DeveloperShellController.php:259Make the test records of the checklists (recipe.testData, TestData): what each test account must see in its perimeter and must not see outside it, labelled TEST CLAUDE …, made through the application's entities as the account by names. Only in the database configs/config.json declares, on this machine, in development (TestAccounts::DatabaseRefusal, as test-accounts). A record it made is never made again ($testDataFile), a record it did not make is never changed; --archive archives what it made.
testDataRecipe($only)
DeveloperShellController.php:341| $only | string | a checklist's name, '' for every one |
| retourne | array | array{prefix: string, by: ?string, records: array<string, array>, order: list<string>, expect: list<array>}, 1: list<string>} the test records of the checklists (TestData::Recipe), merged by key -- two checklists giving one key must give it the same record --, and what was refused |
testDataRefusal($repository, $collections, $database, $mode, $config)
DeveloperShellController.php:306Why test records may not be made: every collection they are made in -- and the accounts' -- must be in this machine's own database, the one configs/config.json declares, in development (TestAccounts::DatabaseRefusal).
| $repository | object | the application's |
| $collections | array | the records' collections |
| $database = null | null | string | set to the database's name |
| $mode = null | null | string | the instance's (MMO_MODE by default) |
| $config = null | null | string | configs/config.json as it is written (this instance's by default) |
| retourne | null | string | the refusal, null when they may |
testDifferences($user, $profile)
DeveloperShellController.php:234testGroups($user, $labels, $collection, $line)
DeveloperShellController.php:217testProfiles($only)
DeveloperShellController.php:188| $only | string | a checklist's name, '' for every one |
| retourne | array | array<string, array{keys: list<string>, label: string, roles: list<string>, groups: list<string>}>, 1: list<string>} the profiles of the checklists (their files, and the ones the application declares), by username -- two profiles naming one account must give it the same roles and groups --, and what was refused |
Membres hérités (65)
| Constantes | Déclaré par | Description | |
|---|---|---|---|
ALERT | iLogLevel | Alert: Action must be taken immediately. | |
ALL | iLogLevel | Mask for all | |
ALL_PLUS | iLogLevel | debug everything | |
BACKTRACE | iLogLevel | ||
CRITICAL | iLogLevel | Critical: Critical conditions. | |
DEBUG | iLogLevel | Debug: Detailed debug information. | |
DEEP | iLogLevel | debug everything with arguments | |
EMERGENCY | iLogLevel | Emergency: System is unusable. | |
ERROR | iLogLevel | Error: Runtime errors that do not require immediate action but should typically be logged and monitored. | |
ERROR_PLUS | iLogLevel | Mask for all error | |
FATAL | iLogLevel | Mask for all fatal error | |
INFO | iLogLevel | Info: Interesting events. | |
INFO_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
MEMORY | iLogLevel | include backtrace object | |
NOTICE | iLogLevel | Notice: Normal but significant events. | |
NOTICE_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
TRACE | iLogLevel | include backtrace as origins | |
WARNING | iLogLevel | Warning: Exceptional occurrences that are not errors. | |
WARNING_PLUS | iLogLevel | Mask for all errors and warnings |
| Propriétés | Déclaré par | Description | |
|---|---|---|---|
interactive | aShellController | ||
verbosity | aModule |
| Méthodes | Déclaré par | Description | |
|---|---|---|---|
alert($message, $context) | aModule | Action must be taken immediately. | |
backtraces($message, $context) | aModule | Force-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it). | |
callInteractiveCommand($route, $cmd) | aShellController | Invoke the method behind $cmd (looked up via InteractiveCommands), or print an "unknown command" message if $cmd doesn't match any registered interactive command. | |
Configure($config) | aModule | Merge $config into this module's configuration in the shared Configuration. | |
critical($message, $context) | aModule | Critical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask. | |
debug($message, $context) | aModule | Detailed debug information. | |
debugName() | aModule | Human-readable identifier used as the default {origin} in this instance's log messages. | |
DefaultConfig() | aModule | The config a module starts from before anything loaded via Configuration is merged in. | |
emergency($message, $context) | aModule | System is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask. | |
error($message, $context) | aModule | Runtime errors that do not require immediate action but should typically be logged and monitored. | |
ExtractRoutes($config) | aController | Extract all the APIRoute from this class, regardless of the fact they are registered in the application | |
getVerbosity() | aModule | ||
hasOtherCommand($route) | aShellController | Tell if another shell controller matched a command of its own (anything but its index) for $route | |
HasRoutes() | aController | Tells if any APIRoute are registered in the application | |
index($route) | aShellController | The built-in interactive REPL: shows the splash + command list, then loops reading a command name (with autocompletion, via ask) and dispatching it through callInteractive… | |
info($message, $context) | aModule | Interesting events. No-op if INFO is currently filtered out by the verbosity mask. | |
Instantiate($config) | aModule | (Re)create the shared instance immediately, configured with $config merged into the class's existing config. | |
InteractiveCommands() | aShellController | Every #[InteractiveCommand(...)]-decorated method on this class, keyed by its command name. | |
IsShared() | aModule | ||
Link($method, $data) | aController | Build a Link (URL + label/icon/description/title, taken from the route's APIRoute metadata) for a registered route. | |
log($level, $message, $context) | aModule | Logs with an arbitrary level. | |
notice($message, $context) | aModule | Normal but significant events. | |
offsetExists($key) | aModule | \ArrayAccess::offsetExists -- tells whether $key is a declared property at all, regardless of whether it is currently readable/writable through array access. | |
offsetGet($key) | aModule | \ArrayAccess::offsetGet -- reads a property directly, unless it has a #[Serialize(serialize: 'methodName')] attribute, in which case that zero-argument method is called instead (e.g. | |
offsetSet($key, $value) | aModule | \ArrayAccess::offsetSet -- sets a property directly, unless it has a #[Serialize(unserialize: 'methodName')] attribute, in which case that method is called with $value instead (e.g. | |
offsetUnset($key) | aModule | \ArrayAccess::offsetUnset -- equivalent to $module[$key] = null. | |
onRoute($route) | aShellController | Same as aController::onRoute, plus: forces the response to shell/text output, and decides whether to fall back to the built-in interactive index command -- it stays active only if this is… | |
Route($method) | aController | Get a registered APIRoute WARNING: if this class was not registered in the application, it will return null. | |
Routes() | aController | Get a list of registered APIRoutes (from this class) in the application WARNING: if this class was not registered in the application, it will return an empty array. | |
route_help($route) | aShellController | Print CLI usage for every 'SHELL'-method route on this controller: the command line to type, each argument's name/required-ness/description, and any declared usage examples. | |
serialize($path, $serializer) | aModule | \MMO\core\interfaces\iSerializable::serialize -- exports every property (via | |
setInteractive($interactive) | aShellController | ||
setVerbosity($verb) | aModule | Set the current verbosity mask, replacing whatever it was before. | |
Shared() | aModule | Get the shared instance, creating (and configuring) it on first call. | |
showInteractiveCommands() | aShellController | Print the list of available interactive commands, plus the [ENTER]/[ESC]/q hints. | |
showSplash() | aShellController | Print the application's icon/version/title/description banner. | |
testVerbosity($level) | aModule | Test whether a given level (or set of levels) is currently enabled by this instance's verbosity mask. | |
traitUnshare($serialize) | aModule | Remove the shared instance, so the next Shared() call creates a fresh one. | |
unserialize($data, $path, $instances) | aModule | \MMO\core\interfaces\iSerializable::unserialize -- merges $data onto DefaultConfig, runs it through the (possibly overridden) constructor, then applies each resulting value to its property (via | |
Unshare($serialize) | aModule | Like tSingleton::Unshare, but also disconnects this module's instance from every event it was listening to (via Event::DisconnectListeners) before dropping it. | |
Url($method, $data) | aController | Build the URL for a registered route, filling in any {placeholder} from $data. | |
warning($message, $context) | aModule | Exceptional occurrences that are not errors. | |
__construct($config) | aModule | protected constructor, so it is not possible to do new Module(...) called by the serialization process just before being injected with data. | |
__wakeup() | aController | Called automatically right after the controller's shared instance is built (aModule::unserialize): registers onRoute as a Route listener with a low priority (-10), so it… |