blob: 5bd4bce28ecfd659745a3e0230ce4995dbdc249c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<?php
/**
* Cache logging information for later display
*
*/
class ElggLogCache {
protected $cache;
public function __construct() {
$this->cache = array();
}
/**
* Insert into cache
*
* @param mixed $data The log data to cache
*/
public function insert($data) {
$this->cache[] = $data;
}
/**
* Insert into cache from plugin hook
*
* @param string $hook
* @param string $type
* @param bool $result
* @param array $params Must have the data at $params['msg']
*/
public function insertDump($hook, $type, $result, $params) {
$this->insert($params['msg']);
return false;
}
/**
* Get the cache
*
* @return array
*/
public function get() {
return $this->cache;
}
}
|