BuilderCommandProvider.php 926 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. ];
  40. }
  41. }