Total Complexity | 7 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
18 | trait GettersTrait |
||
19 | { |
||
20 | protected $_view; |
||
21 | |||
22 | public function getView() |
||
23 | { |
||
24 | if ($this->_view === null) { |
||
25 | $this->_view = $this->getApp()->getView(); |
||
26 | } |
||
27 | |||
28 | return $this->_view; |
||
29 | } |
||
30 | |||
31 | public function take($id) |
||
34 | } |
||
35 | |||
36 | public function getApp() |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * Runs given binary with given arguments. |
||
43 | * Command output passes unchanged to console. |
||
44 | * Returns exit code. |
||
45 | * @param string $name |
||
46 | * @param array|string $args |
||
47 | * @return int exit code |
||
48 | */ |
||
49 | public function passthru($name, $args = []) |
||
50 | { |
||
51 | return $this->take('binaries')->passthruBinary($name, $args); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * Runs given binary with given arguments. Returns stdout array. |
||
56 | * @param string $name |
||
57 | * @param string $args |
||
58 | * @param bool $returnExitCode, default false |
||
59 | * @return array|int stdout or exitcode |
||
60 | */ |
||
61 | public function exec($name, $args = '', $returnExitCode = false) |
||
64 | } |
||
65 | |||
66 | public function execCode($name, $args = '') |
||
69 | } |
||
70 | } |
||
71 |