Total Complexity | 4 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class GdaemonCommands extends Gdaemon |
||
8 | { |
||
9 | const COMMAND_EXEC = 1; |
||
10 | |||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $configurable = [ |
||
15 | 'host', |
||
16 | 'port', |
||
17 | 'username', |
||
18 | 'password', |
||
19 | 'serverCertificate', |
||
20 | 'localCertificate', |
||
21 | 'privateKey', |
||
22 | 'privateKeyPass', |
||
23 | 'timeout', |
||
24 | 'workDir', |
||
25 | ]; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $workDir = ''; |
||
31 | |||
32 | /** |
||
33 | * @var int |
||
34 | */ |
||
35 | protected $mode = self::DAEMON_SERVER_MODE_CMD; |
||
36 | |||
37 | /** |
||
38 | * @param string $command |
||
39 | * @param string $exitCode Command exit code |
||
40 | * @return string Command execute results |
||
41 | */ |
||
42 | public function exec($command, &$exitCode = null): string |
||
68 |