ShellInterface.php 732 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework;
  7. /**
  8. * Shell command line wrapper encapsulates command execution and arguments escaping
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface ShellInterface
  14. {
  15. /**
  16. * Execute a command through the command line, passing properly escaped arguments
  17. *
  18. * @param string $command Command with optional argument markers '%s'
  19. * @param string[] $arguments Argument values to substitute markers with
  20. * @throws \Magento\Framework\Exception\LocalizedException If a command returns non-zero exit code
  21. * @return string
  22. */
  23. public function execute($command, array $arguments = []);
  24. }