Skip to content

RoutesListCommand

Lists every route the app’s actual configured Routing service knows about — i.e.

whatever getRouteCollection()/getMeta() on the class factories.xml/.yaml/.php names for the “routing” entry returns. That class decides for itself whether it’s hand-written routes (Routing::build()), attribute routes only, or both merged via AttributeRoutes::mergeInto() (see samples/app/Routing/AppRouting.php) — this command is a read-only view onto the live result, not a second opinion sourced only from #[Route] attributes.

Attribute-declared routes are additionally scanned (independently of whatever the app’s Routing class does with them) to surface authoring diagnostics — duplicate route names/paths among #[Route] attributes are worth flagging whether or not the app actually merges them in — and to label each listed route’s Source column “Attribute” (its name was declared via #[Route]) or “File” (anything else: Routing::build(), routing.xml, a programmatic builder, …).

final class RoutesListCommand extends AbstractAppCommand

ExtendsAbstractAppCommand
Since1.0.0
SourceConsole/Command/RoutesListCommand.php

These come from an ancestor and are documented where they are declared.

MethodDeclared inDescription
addArgument()CommandAdds an argument.
addOption()CommandAdds an option.
addUsage()CommandAdd a command usage example, it’ll be prefixed with the command name.
complete()CommandSupplies suggestions when resolving possible completion options for input (e.g.
getAliases()CommandReturns the aliases for the command.
getApplication()CommandGets the application instance for this command.
getCode()CommandGets the code that is executed by the command.
getDefinition()CommandGets the InputDefinition attached to this Command.
getDescription()CommandReturns the description for the command.
getHelp()CommandReturns the help for the command.
getHelper()CommandGets a helper instance by name.
getHelperSet()CommandGets the helper set.
getName()CommandReturns the command name.
getNativeDefinition()CommandGets the InputDefinition to be used to create representations of this Command.
getProcessedHelp()CommandReturns the processed help for the command replacing the %command.name% and %command.full_name% patterns with the real values dynamically.
getSubscribedSignals()Command
getSynopsis()CommandReturns the synopsis for the command.
getUsages()CommandReturns alternative usages of the command.
handleSignal()Command
ignoreValidationErrors()CommandIgnores validation errors.
isEnabled()CommandChecks whether the command is enabled or not in the current environment.
isHidden()Command
run()CommandRuns the command.
setAliases()CommandSets the aliases for the command.
setApplication()Command
setCode()CommandSets the code to execute when running this command.
setDefinition()CommandSets an array of argument and option instances.
setDescription()CommandSets the description for the command.
setHelp()CommandSets the help for the command.
setHelperSet()Command
setHidden()Command
setName()CommandSets the name of the command.
setProcessTitle()CommandSets the process title of the command.