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 24
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 75
protected void
copyTestbenchDotEnvFile(Application $app, Filesystem $filesystem, string $workingPath, bool $backupExistingFile = true, bool $resetOnTerminating = true)
| internal |
Copy the ".env" file.
in
CopyTestbenchFiles at line 122
protected string
testbenchEnvironmentFile()
| internal |
Determine the Testbench's environment file.
at line 84
__construct(Config|array $config, string $workingPath)
Construct a new Commander.
at line 96
void
handle()
Handle the command.
at line 138
Application
hypervel()
Create a Hypervel application.
at line 252
protected Closure
resolveApplicationCallback()
Resolve application implementation callback.
at line 270
protected array
extraAttributes()
Get extra attributes for the Testbench application.
at line 285
protected string
getApplicationBasePath()
Resolve the application's base path.
at line 302
static string
applicationBasePath()
Get the application's base path.
at line 310
protected int
handleException(OutputInterface $output, Throwable $error)
Render an exception to the console.
at line 341
protected void
prepareCommandEnvironment(ArgvInput $input)
Prepare environment variables required by the incoming command.
at line 357
protected void
prepareCommandSignals()
Prepare process-level signal handlers for clean shutdown.
Uses pcntl directly since Commander runs outside the Swoole event loop.
at line 398
protected void
unregisterSignals()
Restore default signal handlers.