1 | <?php |
||
10 | class Event |
||
11 | { |
||
12 | private $_command; |
||
13 | private $_output = []; |
||
14 | private $_result; |
||
15 | const TOKEN = 'b2b pushed'; |
||
16 | |||
17 | /** |
||
18 | * __construct |
||
19 | * |
||
20 | * @param string $command |
||
21 | * @param string $password |
||
22 | * @access public |
||
23 | * @return void |
||
|
|||
24 | */ |
||
25 | public function __construct($command, $password) |
||
37 | |||
38 | /** |
||
39 | * getResult |
||
40 | * |
||
41 | * @access public |
||
42 | * @return void |
||
43 | */ |
||
44 | public function getResult() |
||
52 | |||
53 | /** |
||
54 | * logResult |
||
55 | * |
||
56 | * @param string $file |
||
57 | * @access public |
||
58 | * @return void |
||
59 | */ |
||
60 | public function logResult($file) |
||
67 | |||
68 | /** |
||
69 | * logRequest |
||
70 | * |
||
71 | * @param string $file |
||
72 | * @access public |
||
73 | * @return void |
||
74 | */ |
||
75 | public function logRequest($file) |
||
96 | |||
97 | /** |
||
98 | * writeToFile |
||
99 | * |
||
100 | * Write to file |
||
101 | * |
||
102 | * @param string $file relative path to file for write the content |
||
103 | * Example: `bashexec.log` |
||
104 | * |
||
105 | * @param mixed $content String or array |
||
106 | * @access public |
||
107 | * @return void |
||
108 | */ |
||
109 | public function writeToFile($file, $content) |
||
118 | } |
||
119 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.