1 | <?php |
||
17 | class EE_Log |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $_log = ''; |
||
24 | |||
25 | /** |
||
26 | * Used for remote logging |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | private $_remote_logging_url = ''; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $_remote_log = ''; |
||
36 | |||
37 | /** |
||
38 | * @var EE_Log |
||
39 | */ |
||
40 | private static $_instance; |
||
41 | |||
42 | |||
43 | /** |
||
44 | * @return EE_Log |
||
45 | */ |
||
46 | public static function instance() |
||
53 | |||
54 | /** |
||
55 | * @access private |
||
56 | * @return EE_Log |
||
|
|||
57 | */ |
||
58 | private function __construct() |
||
72 | |||
73 | |||
74 | /** |
||
75 | * verify_filesystem |
||
76 | * tests that the required files and folders exist and are writable |
||
77 | * |
||
78 | */ |
||
79 | public function verify_filesystem() |
||
91 | |||
92 | |||
93 | /** |
||
94 | * _format_message |
||
95 | * makes yer log entries look all purdy |
||
96 | * |
||
97 | * @param string $file |
||
98 | * @param string $function |
||
99 | * @param string $message |
||
100 | * @param string $type |
||
101 | * @return string |
||
102 | */ |
||
103 | private function _format_message($file = '', $function = '', $message = '', $type = '') |
||
115 | |||
116 | |||
117 | /** |
||
118 | * log |
||
119 | * adds content to the EE_Log->_log property which gets written to file during the WP 'shutdown' hookpoint via the |
||
120 | * EE_Log::write_log() callback |
||
121 | * |
||
122 | * @param string $file |
||
123 | * @param string $function |
||
124 | * @param string $message |
||
125 | * @param string $type |
||
126 | */ |
||
127 | public function log($file = '', $function = '', $message = '', $type = '') |
||
131 | |||
132 | |||
133 | /** |
||
134 | * write_log |
||
135 | * appends the results of the 'AHEE_log' filter to the espresso log file |
||
136 | */ |
||
137 | public function write_log() |
||
149 | |||
150 | |||
151 | /** |
||
152 | * send_log |
||
153 | * sends the espresso log to a remote URL via a PHP cURL request |
||
154 | */ |
||
155 | public function send_log() |
||
184 | |||
185 | |||
186 | /** |
||
187 | * write_debug |
||
188 | * writes the contents of the current request's $_GET and $_POST arrays to a log file. |
||
189 | * previous entries are overwritten |
||
190 | */ |
||
191 | public function write_debug() |
||
203 | |||
204 | |||
205 | /** |
||
206 | * __clone |
||
207 | */ |
||
208 | public function __clone() |
||
212 | } |
||
213 |
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.