1 | <?php |
||
7 | final class Command |
||
8 | { |
||
9 | private function __construct() |
||
12 | |||
13 | /** |
||
14 | * Execute command with params. |
||
15 | * |
||
16 | * @param string $command |
||
17 | * @param array $params |
||
18 | * @param bool $escape True to escape each param using escapeshellarg |
||
19 | * |
||
20 | * @return bool|string |
||
21 | * |
||
22 | * @throws \Exception |
||
23 | */ |
||
24 | 15 | public static function exec($command, array $params = array(), $escape=true) |
|
46 | |||
47 | /** |
||
48 | * Bind params to command. |
||
49 | * |
||
50 | * @param string $command |
||
51 | * @param array $params |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | 12 | public static function bindParams($command, array $params, $escape) |
|
88 | } |
||
89 |