BuilderCommandProvider.php 843 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Fgm\Drupal\Composer;
  3. use Composer\Plugin\Capability\CommandProvider;
  4. class BuilderCommandProvider implements CommandProvider {
  5. /**
  6. * @var \Composer\Composer
  7. */
  8. protected $composer;
  9. /**
  10. * @var \Composer\IO\IOInterface
  11. */
  12. protected $io;
  13. /**
  14. * An instance of the plugin instantiated not-as-a-command.
  15. *
  16. * @var self
  17. */
  18. protected $plugin;
  19. /**
  20. * BuilderCommandProvider constructor.
  21. *
  22. * @param array|NULL $args
  23. * Guaranteed to contain composer/io/plugin as per CommandProvider.
  24. */
  25. public function __construct(array $args = null) {
  26. $this->composer = $args['composer'];
  27. $this->io = $args['io'];
  28. $this->plugin = $args['plugin'];
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function getCommands() {
  34. return [
  35. new BuildSettingsCommand(),
  36. ];
  37. }
  38. }