CommandLocator.php 596 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Console;
  7. /**
  8. * Locator for Console commands
  9. */
  10. class CommandLocator
  11. {
  12. /**
  13. * @var string[]
  14. */
  15. private static $commands = [];
  16. /**
  17. * @param string $commandListClass
  18. * @return void
  19. */
  20. public static function register($commandListClass)
  21. {
  22. self::$commands[] = $commandListClass;
  23. }
  24. /**
  25. * @return string[]
  26. */
  27. public static function getCommands()
  28. {
  29. return self::$commands;
  30. }
  31. }