From c4a53af23533d44383a87b5180b15e1a01a0e18a Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 2 Jul 2011 12:07:27 -0400 Subject: added logging to the web page footer --- mod/developers/classes/ElggLogCache.php | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 mod/developers/classes/ElggLogCache.php (limited to 'mod/developers/classes/ElggLogCache.php') diff --git a/mod/developers/classes/ElggLogCache.php b/mod/developers/classes/ElggLogCache.php new file mode 100644 index 000000000..19df598d7 --- /dev/null +++ b/mod/developers/classes/ElggLogCache.php @@ -0,0 +1,43 @@ +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']); + } + + /** + * Get the cache + * + * @return array + */ + public function get() { + return $this->cache; + } +} -- cgit v1.2.3