1 | <?php |
||
16 | class ProcessBuilder implements ProcessBuilderInterface |
||
17 | { |
||
18 | /** |
||
19 | * The command to run and its arguments listed as separate entries |
||
20 | * |
||
21 | * @var array |
||
22 | */ |
||
23 | private $command; |
||
24 | |||
25 | /** |
||
26 | * The working directory or null to use the working dir of the current PHP process |
||
27 | * |
||
28 | * @var string|null |
||
29 | */ |
||
30 | private $cwd; |
||
31 | |||
32 | /** |
||
33 | * ProcessBuilder constructor. |
||
34 | * @param array $command |
||
35 | */ |
||
36 | public function __construct($command) |
||
41 | |||
42 | /** |
||
43 | * Creates a Process instance and returns it |
||
44 | * |
||
45 | * @return Process |
||
46 | */ |
||
47 | public function getProcess() |
||
54 | |||
55 | /** |
||
56 | * @inheritdoc |
||
57 | */ |
||
58 | public function add($argument) |
||
64 | |||
65 | /** |
||
66 | * @inheritdoc |
||
67 | */ |
||
68 | public function setWorkingDirectory($directory) |
||
74 | |||
75 | /** |
||
76 | * The command to run or a binary path and its arguments listed as separate entries |
||
77 | * |
||
78 | * @param array $command |
||
79 | * |
||
80 | * @return static |
||
81 | */ |
||
82 | public static function create(array $command) |
||
86 | |||
87 | } |
||
88 |