BuilderCommandProvider.php 968 B

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