12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?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 array|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 BuildSettingsCommand(),
- new HugoConfigCommand(),
- new MergeParamsCommand(),
- new PhpMemcacheAdminConfigCommand(),
- ];
- }
- }
|