InvokedProcess.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace Illuminate\Contracts\Process;
  3. interface InvokedProcess
  4. {
  5. /**
  6. * Get the process ID if the process is still running.
  7. *
  8. * @return int|null
  9. */
  10. public function id();
  11. /**
  12. * Send a signal to the process.
  13. *
  14. * @param int $signal
  15. * @return $this
  16. */
  17. public function signal(int $signal);
  18. /**
  19. * Determine if the process is still running.
  20. *
  21. * @return bool
  22. */
  23. public function running();
  24. /**
  25. * Get the standard output for the process.
  26. *
  27. * @return string
  28. */
  29. public function output();
  30. /**
  31. * Get the error output for the process.
  32. *
  33. * @return string
  34. */
  35. public function errorOutput();
  36. /**
  37. * Get the latest standard output for the process.
  38. *
  39. * @return string
  40. */
  41. public function latestOutput();
  42. /**
  43. * Get the latest error output for the process.
  44. *
  45. * @return string
  46. */
  47. public function latestErrorOutput();
  48. /**
  49. * Wait for the process to finish.
  50. *
  51. * @param callable|null $output
  52. * @return \Illuminate\Console\Process\ProcessResult
  53. */
  54. public function wait(?callable $output = null);
  55. }