Commander
class Commander
Traits
Constants
| protected TESTBENCH |
The testbench implementation class. |
Properties
| protected Application|null | $app | Application instance. |
|
| protected Config | $config | List of configurations. |
|
| protected string | $environmentFile | The environment file name. |
|
| protected array<int, class-string> | $providers | List of providers. |
|
| protected array<int, int> | $registeredSignals | Registered pcntl signal handlers for cleanup on teardown. |
|
| protected bool|null | $previousAsyncSignals | Whether async signals were enabled before we changed them. |
Methods
Copy the "testbench.yaml" file.
Copy the ".env" file.
Determine the Testbench's environment file.
Handle the command.
Create a Hypervel application.
Resolve application implementation callback.
Get extra attributes for the Testbench application.
Resolve the application's base path.
Get the application's base path.
Prepare environment variables required by the incoming command.
Prepare process-level signal handlers for clean shutdown.
Restore default signal handlers.
Details
in
CopyTestbenchFiles at line 23
protected void
copyTestbenchConfigurationFile(Application $app, Filesystem $filesystem, string $workingPath, bool $backupExistingFile = true, bool $resetOnTerminating = true)
| internal |
Copy the "testbench.yaml" file.
in
CopyTestbenchFiles at line 68
protected void
copyTestbenchDotEnvFile(Application $app, Filesystem $filesystem, string $workingPath, bool $backupExistingFile = true, bool $resetOnTerminating = true)
| internal |
Copy the ".env" file.
in
CopyTestbenchFiles at line 105
protected string
testbenchEnvironmentFile()
| internal |
Determine the Testbench's environment file.
at line 83
__construct(Config|array $config, string $workingPath)
Construct a new Commander.
at line 95
void
handle()
Handle the command.
at line 126
Application
hypervel()
Create a Hypervel application.
at line 174
protected Closure
resolveApplicationCallback()
Resolve application implementation callback.
at line 192
protected array
extraAttributes()
Get extra attributes for the Testbench application.
at line 207
protected string
getApplicationBasePath()
Resolve the application's base path.
at line 224
static string
applicationBasePath()
Get the application's base path.
at line 232
protected int
handleException(OutputInterface $output, Throwable $error)
Render an exception to the console.
at line 253
protected void
prepareCommandEnvironment(InputInterface $input)
Prepare environment variables required by the incoming command.
at line 269
protected void
prepareCommandSignals()
Prepare process-level signal handlers for clean shutdown.
Uses pcntl directly since Commander runs outside the Swoole event loop.
at line 307
protected void
unregisterSignals()
Restore default signal handlers.