EjectCommand
API reference › Scaffold › Console › Command › EjectCommand
Marks a file as ejected in scaffold-lock.json so scaffold stops managing it, without deleting it from disk.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
configure() protected | Declares the file argument and the --yes option. | EjectCommand |
execute() protected final | Validates the input, resolves the project root and runs AbstractScaffoldCommand::handle(). | AbstractScaffoldCommand |
handle() protected | Ejects the given file, or previews the ejection without --yes. | EjectCommand |
validate() protected | Returns whether the input is valid, writing the error to the error output when it is not. | AbstractScaffoldCommand |
Method details
Section titled “Method details”configure()
Section titled “configure() ”protected function configure(): voidDeclares the file argument and the --yes option.
handle()
Section titled “handle() ”protected function handle(Symfony\Component\Console\Input\InputInterface $input, PHPForge\Scaffold\Console\SymfonyOutputWriter $out, string $projectRoot): intEjects the given file, or previews the ejection without --yes.
Parameters
| Parameter | Type | Description |
|---|---|---|
$input | Symfony\ | Input with the file argument and the --yes option. |
$out | PHPForge\ | Output sink that receives the ejection notice and the error messages. |
$projectRoot | string | Absolute path of the project root. |
Returns
int: Exit code of EjectService::run().