MakeRoutes class
Framework\CLI\Commands\MakeRoutes
Class MakeRoutes.
Extends Framework\CLI\Command
Defined in libraries/dev-commands/src/MakeRoutes.php
Properties #
- $name
- -
- $description
- -
- $usage
- -
- $options
- -
- $group
- -
$name
protected string $name = 'makeroutes'
$description
protected string $description = 'Make routes file.'
$usage
protected string $usage = 'makeroutes [options] [filepath]'
$options
protected array $options = array (
'-o' => 'Overwrite the file if it exists.',
'-s' => 'Show file contents.',
)
$group
protected string $group = 'Routing'
Methods #
- run()
- -
- getClasses()
- -
- getFileContents()
- -
- getFilepath()
- Check if the filepath is absolute and return it or make it relative to the current working directory and return.
- getOrigins()
- -
- getRoutes()
- -
- getRoutesNotFound()
- -
- makeCollections()
- -
- sortOrigins()
- -
- sortRoutes()
- -
run()
public function run(): void
Returns
void
getClasses()
protected function getClasses(): array
Returns
array
getFileContents()
protected function getFileContents(): string
Returns
string
getFilepath()
protected function getFilepath(): ?string
Check if the filepath is absolute and return it or make it relative to the current working directory and return.
Returns
?string
- the filepath or null if it is not set
getOrigins()
protected function getOrigins(): array
Returns
array
getRoutes()
protected function getRoutes(): array
Returns
array
getRoutesNotFound()
protected function getRoutesNotFound(): array
Returns
array
makeCollections()
protected function makeCollections(): string
Returns
string
sortOrigins()
protected function sortOrigins(array $origins): array
Parameters
- array $origins
Returns
array
sortRoutes()
protected function sortRoutes(array $routes): array
Parameters
- array $routes
Returns
array
Inherited methods #
-
__construct()fromFramework\CLI\Command -
getConsole()fromFramework\CLI\Command -
setConsole()fromFramework\CLI\Command -
getName()fromFramework\CLI\Command -
setName()fromFramework\CLI\Command -
getGroup()fromFramework\CLI\Command -
setGroup()fromFramework\CLI\Command -
getDescription()fromFramework\CLI\Command -
setDescription()fromFramework\CLI\Command -
getUsage()fromFramework\CLI\Command -
setUsage()fromFramework\CLI\Command -
getOptions()fromFramework\CLI\Command -
setOptions()fromFramework\CLI\Command -
isActive()fromFramework\CLI\Command -
activate()fromFramework\CLI\Command -
deactivate()fromFramework\CLI\Command