class Illuminate / Foundation / Console / ServeCommand

ServeCommand

Extends

Properties

protected

$name string

The console command name.

Default: 'serve'
protected

$description string

The console command description.

Default: 'Serve the application on the PHP development server'
protected

$portOffset int

The current port offset.

protected

$requestsPool array

The list of requests being handled and their start time.

Default: null
protected

$serverRunningHasBeenDisplayed bool

Indicates if the "Server running on..." output message has been displayed.

Default: false
public static

$passthroughVariables string[]

The environment variables that should be passed from host machine to the PHP server process.

Default: array

Methods

public

handle ( ) : int

Execute the console command.

protected

startProcess ( $hasEnvironment ) : Symfony\...\Process

Start a new server process.

Parameters

  • $hasEnvironment bool
protected

serverCommand ( ) : array

Get the full server command.

protected

host ( ) : string

Get the host for the command.

protected

port ( ) : string

Get the port for the command.

protected

getHostAndPort ( ) : array

Get the host and port from the host option string.

protected

canTryAnotherPort ( ) : bool

Check if the command has reached its maximum number of port tries.

protected

handleProcessOutput ( ) : callable

Returns a "callable" to handle the process output.

protected

getDateFromLine ( $line ) : Carbon

Get the date from the given PHP server output.

Parameters

  • $line string
protected

getRequestPortFromLine ( $line ) : int

Get the request port from the given PHP server output.

Parameters

  • $line string
protected

getOptions ( ) : array

Get the console command options.