scratch – Blame information for rev 115
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
115 | office | 1 | <?php |
2 | |||
3 | /* |
||
4 | * This file is part of Alchemy\BinaryDriver. |
||
5 | * |
||
6 | * (c) Alchemy <info@alchemy.fr> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace Alchemy\BinaryDriver; |
||
13 | |||
14 | use Alchemy\BinaryDriver\Exception\InvalidArgumentException; |
||
15 | use Symfony\Component\Process\Process; |
||
16 | |||
17 | interface ProcessBuilderFactoryInterface |
||
18 | { |
||
19 | /** |
||
20 | * Returns a new instance of Symfony Process |
||
21 | * |
||
22 | * @param string|array $arguments An argument or an array of arguments |
||
23 | * |
||
24 | * @return Process |
||
25 | * |
||
26 | * @throws InvalidArgumentException |
||
27 | */ |
||
28 | public function create($arguments = array()); |
||
29 | |||
30 | /** |
||
31 | * Returns the path to the binary that is used |
||
32 | * |
||
33 | * @return String |
||
34 | */ |
||
35 | public function getBinary(); |
||
36 | |||
37 | /** |
||
38 | * Sets the path to the binary |
||
39 | * |
||
40 | * @param String $binary A path to a binary |
||
41 | * |
||
42 | * @return ProcessBuilderFactoryInterface |
||
43 | * |
||
44 | * @throws InvalidArgumentException In case binary is not executable |
||
45 | */ |
||
46 | public function useBinary($binary); |
||
47 | |||
48 | /** |
||
49 | * Set the default timeout to apply on created processes. |
||
50 | * |
||
51 | * @param integer|float $timeout |
||
52 | * |
||
53 | * @return ProcessBuilderFactoryInterface |
||
54 | * |
||
55 | * @throws InvalidArgumentException In case the timeout is not valid |
||
56 | */ |
||
57 | public function setTimeout($timeout); |
||
58 | |||
59 | /** |
||
60 | * Returns the current timeout applied to the created processes. |
||
61 | * |
||
62 | * @return integer|float |
||
63 | */ |
||
64 | public function getTimeout(); |
||
65 | } |