Index

InteractiveCommand

MMO\core\attributes · 1 symbol · generated 5 Oct 2026

class

InteractiveCommand

Command.php:35

A Command exposed in aShellController's built-in interactive REPL: $cmd is what the user types to select it (matched as a required, constant first "argument" of the underlying route).

#[Attribute(4)] class MMO\core\attributes\InteractiveCommand extends MMO\core\attributes\Command
Namespace
MMO\core\attributes
Extends
Command
#[InteractiveCommand('help', 'show help')] public function route_help(Route $route): void {...}

Properties1

cmd

readonly
readonly string $cmd
Type
string

Methods1

__construct($cmd, $info, $body, $mediaTypes, $order)

Command.php:45
function __construct( string $cmd, array|string $info = [], array $body = [], array $mediaTypes = ['text'], int $order = 0 )
$cmdstringthe name typed by the user to invoke this command in interactive mode
$info = []array | stringa description, or a full OpenAPI-style info array
$body = []arrayadditional named arguments, beyond the implicit leading $cmd constant
$mediaTypes = ['text']array
$order = 0int
Inherited members (53)
PropertiesDeclared byDescription
bodyAPIRoute
cookieAPIRoute
fragmentAPIRoute
headerAPIRoute
infoAPIRoute
methodAPIRoute
optsAPIRoute
orderAPIRoute
pathAPIRoute
queryAPIRoute
MethodsDeclared byDescription
addAPIParameter($parameters, $info)APIRoute
addAPIParameters($params, $in)APIRoute
addInfo($info, $default)APIRouteAdd information to the route
addOptions($opts, $appendList)APIRouteMerge $opts into the existing options (through merge), rather than replacing them wholesale like setOptions.
api()APIRouteBuild this route's OpenAPI operation object (path parameters, query/header/cookie parameters, request body, merged with any extra addInfo info).
clearOptions()APIRouteEmpty the options bag.
createRequest($data, $method)APIRouteBuild a real Request matching this route, useful to synthesize/test a call without going through HTTP.
debugName()APIRoute
getBody($data)APIRoute
getCookie($data)APIRoute
getFragment()APIRoute
getHeader($data)APIRoute
getInfo($key, $default)APIRoute
getMethod()APIRoute
getOperation()APIRoute
getOption($key, $default)APIRoute
getOptions()APIRoute
getOrder()APIRoute
getParameters($in, $data)APIRoute
getPath()APIRoute
getQuery($data)APIRoute
getUrl($data, $absolute)APIRouteGet path url. If no data are passed, it return a relative url with placeholders
hasInfo($key)APIRoute
isHidden()APIRoute
jsonSerialize()APIRoute
match($request, $matches)APIRouteCheck if a request match this path.
setBasepath($path)APIRoute
setBody($value)APIRoute
setCookie($value)APIRoute
setFragment($fragment)APIRoute
setHeader($value)APIRoute
setMethod($method)APIRoute
setOperation($id)APIRoute
setOption($key, $value)APIRouteSet (or, with a null $value, remove) a single option.
setOptions($opts)APIRouteReplace the whole options bag.
setOrder($value)APIRoute
setParameters($in, $value)APIRouteSet parameters capture information
setPath($path)APIRouteSame as From, except wildcard are converted to placeholders
setQuery($value)APIRoute
setUrl($url)APIRouteParse a full {method}|{path}?{query}#{fragment} route URL (see this class's own docblock for the format) and set every corresponding property (method, path, query, fragment) from it.
toLink($data, $rels)APIRoute
uid()APIRoute
__toString()APIRoute