CommandLoaderInterface.php 874 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Console\CommandLoader;
  11. use Symfony\Component\Console\Command\Command;
  12. use Symfony\Component\Console\Exception\CommandNotFoundException;
  13. /**
  14. * @author Robin Chalas <robin.chalas@gmail.com>
  15. */
  16. interface CommandLoaderInterface
  17. {
  18. /**
  19. * Loads a command.
  20. *
  21. * @return Command
  22. *
  23. * @throws CommandNotFoundException
  24. */
  25. public function get(string $name);
  26. /**
  27. * Checks if a command exists.
  28. *
  29. * @return bool
  30. */
  31. public function has(string $name);
  32. /**
  33. * @return string[] All registered command names
  34. */
  35. public function getNames();
  36. }