Skip to content
PHP Ecosystem
Explore

Application

API reference › Scaffold › Console › Application

final classPHPForge\Scaffold\Console\Application
ExtendsSymfony\Component\Console\Application
Sourcesrc/Console/Application.php

Runs the status, providers, diff, eject, reapply, prune and sync commands as the vendor/bin/scaffold console application.

MethodDescriptionDefined by
__construct()Creates the application and registers the scaffold commands.Application
resolveVersion() staticReturns the installed version of $package from Composer’s runtime metadata, or Application::FALLBACK_VERSION when the metadata does not list it.Application
getDefaultInputDefinition() protectedReturns the default input definition with the global --working-dir (-d) option added.Application
ConstantValueDescriptionDefined 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
public function __construct()

Creates the application and registers the scaffold commands.

public static function resolveVersion(string $package = \self::NAME): string

Returns the installed version of $package from Composer’s runtime metadata, or Application::FALLBACK_VERSION when the metadata does not list it.

Parameters

ParameterTypeDescription
$packagestringComposer 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.

protected function getDefaultInputDefinition(): Symfony\Component\Console\Input\InputDefinition

Returns 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.