aboutsummaryrefslogtreecommitdiff
path: root/mod/developers/classes
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-07-02 12:07:27 -0400
committercash <cash.costello@gmail.com>2011-07-02 12:07:27 -0400
commitc4a53af23533d44383a87b5180b15e1a01a0e18a (patch)
tree0072123e654c1c7886295e218f68be1403d1ea61 /mod/developers/classes
parentae5ad0a65508725871159ffb6a068fcb2084aad7 (diff)
downloadelgg-c4a53af23533d44383a87b5180b15e1a01a0e18a.tar.gz
elgg-c4a53af23533d44383a87b5180b15e1a01a0e18a.tar.bz2
added logging to the web page footer
Diffstat (limited to 'mod/developers/classes')
-rw-r--r--mod/developers/classes/ElggLogCache.php43
1 files changed, 43 insertions, 0 deletions
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 @@
+<?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']);
+ }
+
+ /**
+ * Get the cache
+ *
+ * @return array
+ */
+ public function get() {
+ return $this->cache;
+ }
+}