1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- declare(strict_types=1);
- namespace Fgm\Drupal\Composer;
- use Composer\Plugin\Capability\CommandProvider;
- /**
- * Command capability for Composer plugins: provides the list of commmands.
- *
- * @package Fgm\Drupal\Composer
- */
- class BuilderCommandProvider implements CommandProvider {
- /**
- * The currently running Composer instance.
- *
- * @var \Composer\Composer
- */
- protected $composer;
- /**
- * The Composer I/O.
- *
- * @var \Composer\IO\IOInterface
- */
- protected $io;
- /**
- * An instance of the plugin instantiated not-as-a-command.
- *
- * @var self
- */
- protected $plugin;
- /**
- * BuilderCommandProvider constructor.
- *
- * @param mixed[]|null $args
- * Guaranteed to contain composer/io/plugin as per CommandProvider.
- */
- public function __construct(?array $args = NULL) {
- $this->composer = $args['composer'];
- $this->io = $args['io'];
- $this->plugin = $args['plugin'];
- }
- /**
- * {@inheritdoc}
- */
- public function getCommands() {
- return [
- new BuildServicesCommand(),
- new BuildSettingsCommand(),
- new HugoConfigCommand(),
- new MergeParamsCommand(),
- new PhpMemcacheAdminConfigCommand(),
- ];
- }
- }
|