class ServerRestartStrategy implements RestartStrategy

Properties

protected int|null $processId
protected bool $lifecycleRunning
protected bool $restartRequested
protected bool $stopping
protected string $bin
protected non-empty-list<non-empty-string> $command

Methods

__construct(Container $container, OutputInterface $output)

No description

void
start()

Perform the initial start of the server process.

void
restart()

Restart the server process (stop current instance, start new).

void
stop()

Stop the currently running server process.

void
terminateServer()

Terminate the currently published server process.

void
launchServer()

Launch the server lifecycle in its owner coroutine.

void
runServer()

Run one watched server process to completion.

array
serverCommand()

Build the server command arguments without a shell intermediary.

mixed
openProcess(array $descriptorSpec, array $pipes)

Open the watched server process.

int
closeProcess(mixed $process)

Close the watched server process.

array
processStatus(mixed $process)

Read the watched server process status.

bool
signalProcess(int $pid, int $signal)

Send a signal to a server process.

void
reloadEnvironment()

Reload the application environment before spawning a server.

Details

at line 32
__construct(Container $container, OutputInterface $output)

No description

Parameters

Container $container
OutputInterface $output

at line 64
void start()

Perform the initial start of the server process.

Return Value

void

at line 78
void restart()

Restart the server process (stop current instance, start new).

Return Value

void

at line 97
void stop()

Stop the currently running server process.

Return Value

void

at line 107
protected void terminateServer()

Terminate the currently published server process.

Return Value

void

at line 135
protected void launchServer()

Launch the server lifecycle in its owner coroutine.

Return Value

void

at line 167
protected void runServer()

Run one watched server process to completion.

Return Value

void

at line 230
protected array serverCommand()

Build the server command arguments without a shell intermediary.

Return Value

array

at line 245
protected mixed openProcess(array $descriptorSpec, array $pipes)

Open the watched server process.

Parameters

array $descriptorSpec
array $pipes

Return Value

mixed

at line 259
protected int closeProcess(mixed $process)

Close the watched server process.

Parameters

mixed $process

Return Value

int

at line 270
protected array processStatus(mixed $process)

Read the watched server process status.

Parameters

mixed $process

Return Value

array

at line 278
protected bool signalProcess(int $pid, int $signal)

Send a signal to a server process.

Parameters

int $pid
int $signal

Return Value

bool

at line 286
protected void reloadEnvironment()

Reload the application environment before spawning a server.

Return Value

void