MakeRoutes
extends Command
in package
Class MakeRoutes.
Table of Contents
- $description : string
- $name : string
- $options : array<string|int, mixed>
- $usage : string
- run() : void
- getClasses() : array<int, string>
- getFileContents() : string
- getFilepath() : string|null
- Check if the filepath is absolute and return it or make it relative to the current working directory and return.
- getOrigins() : array<string, array<string|int, mixed>>
- getRoutes() : array<int, array<string|int, mixed>>
- getRoutesNotFound() : array<int, array<string|int, mixed>>
- makeCollections() : string
- sortOrigins() : array<string|int, mixed>
- sortRoutes() : array<string|int, mixed>
Properties
$description
protected
string
$description
= 'Make routes file.'
$name
protected
string
$name
= 'makeroutes'
$options
protected
array<string|int, mixed>
$options
= ['-o' => 'Overwrite the file if it exists.', '-s' => 'Show file contents.']
$usage
protected
string
$usage
= 'makeroutes [options] [filepath]'
Methods
run()
public
run() : void
Return values
void —getClasses()
protected
getClasses() : array<int, string>
Return values
array<int, string> —getFileContents()
protected
getFileContents() : string
Return values
string —getFilepath()
Check if the filepath is absolute and return it or make it relative to the current working directory and return.
protected
getFilepath() : string|null
Return values
string|null —the filepath or null if it is not set
getOrigins()
protected
getOrigins() : array<string, array<string|int, mixed>>
Return values
array<string, array<string|int, mixed>> —getRoutes()
protected
getRoutes() : array<int, array<string|int, mixed>>
Return values
array<int, array<string|int, mixed>> —getRoutesNotFound()
protected
getRoutesNotFound() : array<int, array<string|int, mixed>>
Return values
array<int, array<string|int, mixed>> —makeCollections()
protected
makeCollections() : string
Return values
string —sortOrigins()
protected
sortOrigins(array<string|int, mixed> $origins) : array<string|int, mixed>
Parameters
- $origins : array<string|int, mixed>
Return values
array<string|int, mixed> —sortRoutes()
protected
sortRoutes(array<string|int, mixed> $routes) : array<string|int, mixed>
Parameters
- $routes : array<string|int, mixed>