1 | <?php |
||
16 | class WC_Logger { |
||
17 | |||
18 | /** |
||
19 | * Stores open file _handles. |
||
20 | * |
||
21 | * @var array |
||
22 | * @access private |
||
23 | */ |
||
24 | private $_handles; |
||
25 | |||
26 | /** |
||
27 | * Constructor for the logger. |
||
28 | */ |
||
29 | public function __construct() { |
||
32 | |||
33 | /** |
||
34 | * Destructor. |
||
35 | */ |
||
36 | public function __destruct() { |
||
43 | |||
44 | /** |
||
45 | * Open log file for writing. |
||
46 | * |
||
47 | * @param string $handle |
||
48 | * @param string $mode |
||
49 | * @return bool success |
||
50 | */ |
||
51 | protected function open( $handle, $mode = 'a' ) { |
||
71 | |||
72 | /** |
||
73 | * Close a handle. |
||
74 | * |
||
75 | * @param string $handle |
||
76 | * @return bool success |
||
77 | */ |
||
78 | protected function close( $handle ) { |
||
88 | |||
89 | /** |
||
90 | * Add a log entry to chosen file. |
||
91 | * |
||
92 | * @param string $handle |
||
93 | * @param string $message |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function add( $handle, $message ) { |
||
109 | |||
110 | /** |
||
111 | * Clear entries from chosen file. |
||
112 | * |
||
113 | * @param string $handle |
||
114 | * |
||
115 | * @return bool |
||
116 | */ |
||
117 | public function clear( $handle ) { |
||
135 | |||
136 | /** |
||
137 | * Remove/delete the chosen file. |
||
138 | * |
||
139 | * @param string $handle |
||
140 | * |
||
141 | * @return bool |
||
142 | */ |
||
143 | public function remove( $handle ) { |
||
160 | } |
||
161 |