AdminController
MMO\core\controllers · 1 symbol · generated 30 Sep 2026
AdminController
AdminController.php:18CLI admin commands (status, phpinfo, package listing/building, cron management), run via the shell request dispatcher (aShellController) -- each route_* method backs one #[Command]/#[InteractiveCommand].
- Namespace
MMO\core\controllers- Extends
- aShellController
Index
| getServerInfo() | What the server is made of: the application, the php it runs on, its extensions, and every package the framework included with its version. | |
| printServerInfo($info) | Print getServerInfo as text -- the sections, then the packages and the extensions as tables. | |
| routeServerInfo($route) | ||
| route_build($route) | Read a package manifest (e.g. | |
| route_buildClean($route) | Remove every stale build artifact for every included package and its dependencies (interactively confirmed one by one). | |
| route_cron() | Print every registered cron job (interval, command, notification email) as a table. | |
| route_cronAdd($route) | Add a cron job: interval (the 2nd shell argument) then the command to run (every remaining argument, re-joined with spaces). | |
| route_cronRemove($route) | Remove a cron job by its command (every shell argument after the command name, re-joined with spaces). | |
| route_cronRemoveAll($route) | Remove every cron job. | |
| route_packages() | List every known package and its latest available version. | |
| route_phpinfo($route) | Show what the server is made of: interactively, prompts for which section (php's own phpinfo() sections included); non-interactively, prints the whole report as text, or -- with -m -- answers i… | |
| route_status($route) | Print (or, with -m, respond with JSON of) every included package's name/version. |
Methods12
getServerInfo()
AdminController.php:54What the server is made of: the application, the php it runs on, its extensions, and every package the framework included with its version. One payload, rendered three ways -- as text by route_phpinfo, as json by the same command with -m, and as json over http by routeServerInfo.
| returns | array |
printServerInfo($info)
AdminController.php:110Print getServerInfo as text -- the sections, then the packages and the extensions as tables. This is what the phpinfo command shows when it is not asked for one php section in particular.
| $info = null | null | array | defaults to getServerInfo |
| returns | void |
routeServerInfo($route)
AdminController.php:189- See
getServerInfoover http, as json -- the source of theservertab of<mmo-app>'s console drawer.
route_build($route)
AdminController.php:217Read a package manifest (e.g. mmo.json) and build it.
route_buildClean($route)
AdminController.php:227Remove every stale build artifact for every included package and its dependencies (interactively confirmed one by one).
route_cron()
AdminController.php:241Print every registered cron job (interval, command, notification email) as a table.
| returns | void |
route_cronAdd($route)
AdminController.php:264Add a cron job: interval (the 2nd shell argument) then the command to run (every remaining argument, re-joined with spaces).
route_cronRemove($route)
AdminController.php:284Remove a cron job by its command (every shell argument after the command name, re-joined with spaces).
route_cronRemoveAll($route)
AdminController.php:300Remove every cron job.
route_packages()
AdminController.php:200List every known package and its latest available version.
| returns | void |
route_phpinfo($route)
AdminController.php:150Show what the server is made of: interactively, prompts for which section (php's own phpinfo() sections included); non-interactively, prints the whole report as text, or -- with -m -- answers it as json, the same payload routeServerInfo serves.
route_status($route)
AdminController.php:25Print (or, with -m, respond with JSON of) every included package's name/version.
| $route | Route | |
| returns |
Inherited members (64)
| Constants | Declared by | 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 |
| Properties | Declared by | Description | |
|---|---|---|---|
interactive | aShellController | ||
verbosity | aModule |
| Methods | Declared by | 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 | ||
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… |