Start class
Framework\CLI\Commands\Start
Class Start.
Extends Framework\CLI\Command
Defined in libraries/dev-commands/src/Start.php
Properties #
- $name
- -
- $description
- -
- $usage
- -
- $group
- -
$name
protected string $name = 'start'
$description
protected string $description = 'Starts the app using the built-in PHP server.'
$usage
protected string $usage = 'start [port]'
$group
protected string $group = 'HTTP'
Methods #
- run()
- -
- buildServerCommand()
- -
- executeServer()
- -
- normalizePath()
- -
- resolveDocumentRoot()
- -
- resolvePort()
- -
- resolveRouterScript()
- -
run()
public function run(): void
Returns
void
buildServerCommand()
protected function buildServerCommand(int $port, string $documentRoot, ?string $routerScript): string
Parameters
- int $port
- string $documentRoot
- ?string $routerScript
Returns
string
executeServer()
protected function executeServer(string $command): int
Parameters
- string $command
Returns
int
normalizePath()
protected function normalizePath(string $path): string
Parameters
- string $path
Returns
string
resolveDocumentRoot()
protected function resolveDocumentRoot(string $cwd): string
Parameters
- string $cwd
Returns
string
resolvePort()
protected function resolvePort(?string $port): ?int
Parameters
- ?string $port
Returns
?int
resolveRouterScript()
protected function resolveRouterScript(string $documentRoot): ?string
Parameters
- string $documentRoot
Returns
?string
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