Application
API reference › Scaffold › Console › Application
Runs the status, providers, diff, eject, reapply, prune and sync commands as the
vendor/bin/scaffold console application.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Creates the application and registers the scaffold commands. | Application |
resolveVersion() static | Returns the installed version of $package from Composer’s runtime metadata, or Application::FALLBACK_VERSION when the metadata does not list it. | Application |
getDefaultInputDefinition() protected | Returns the default input definition with the global --working-dir (-d) option added. | Application |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
FALLBACK_VERSION | '0.3.x-dev' | Version reported when Composer’s runtime metadata does not list the package. | Application |
NAME | 'php-forge/scaffold' | Application / Composer package name. | Application |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct()Creates the application and registers the scaffold commands.
resolveVersion()
Section titled “resolveVersion() ”public static function resolveVersion(string $package = \self::NAME): stringReturns the installed version of $package from Composer’s runtime metadata, or Application::FALLBACK_VERSION
when the metadata does not list it.
Parameters
| Parameter | Type | Description |
|---|---|---|
$package | string | Composer package name to query; defaults to this application’s package. |
Returns
string: Installed pretty version (for example, 1.2.0 or dev-main), or the fallback version.
getDefaultInputDefinition()
Section titled “getDefaultInputDefinition() ”protected function getDefaultInputDefinition(): Symfony\Component\Console\Input\InputDefinitionReturns the default input definition with the global --working-dir (-d) option added.
Returns
Symfony\Component\Console\Input\InputDefinition: Symfony’s default definition extended with --working-dir.