class GenerateProxyClassApplication in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Command/GenerateProxyClassApplication.php \Drupal\Core\Command\GenerateProxyClassApplication
- 10 core/lib/Drupal/Core/Command/GenerateProxyClassApplication.php \Drupal\Core\Command\GenerateProxyClassApplication
Provides a console command to generate proxy classes.
Hierarchy
- class \Drupal\Core\Command\GenerateProxyClassApplication extends \Symfony\Component\Console\Application
Expanded class hierarchy of GenerateProxyClassApplication
1 file declares its use of GenerateProxyClassApplication
- generate-proxy-class.php in core/
scripts/ generate-proxy-class.php - A command line application to generate proxy classes.
File
- core/
lib/ Drupal/ Core/ Command/ GenerateProxyClassApplication.php, line 12
Namespace
Drupal\Core\CommandView source
class GenerateProxyClassApplication extends Application {
/**
* The proxy builder.
*
* @var \Drupal\Component\ProxyBuilder\ProxyBuilder
*/
protected $proxyBuilder;
/**
* Constructs a new GenerateProxyClassApplication instance.
*
* @param \Drupal\Component\ProxyBuilder\ProxyBuilder $proxy_builder
* The proxy builder.
*/
public function __construct(ProxyBuilder $proxy_builder) {
$this->proxyBuilder = $proxy_builder;
parent::__construct();
}
/**
* {@inheritdoc}
*/
protected function getCommandName(InputInterface $input) {
return 'generate-proxy-class';
}
/**
* {@inheritdoc}
*/
protected function getDefaultCommands() {
// Even though this is a single command, keep the HelpCommand (--help).
$default_commands = parent::getDefaultCommands();
$default_commands[] = new GenerateProxyClassCommand($this->proxyBuilder);
return $default_commands;
}
/**
* {@inheritdoc}
*
* Overridden so the application doesn't expect the command name as the first
* argument.
*/
public function getDefinition() {
$definition = parent::getDefinition();
// Clears the normal first argument (the command name).
$definition
->setArguments();
return $definition;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
GenerateProxyClassApplication:: |
protected | property | The proxy builder. | |
GenerateProxyClassApplication:: |
protected | function | ||
GenerateProxyClassApplication:: |
protected | function | ||
GenerateProxyClassApplication:: |
public | function | Overridden so the application doesn't expect the command name as the first argument. | |
GenerateProxyClassApplication:: |
public | function | Constructs a new GenerateProxyClassApplication instance. |