summaryrefslogtreecommitdiff
path: root/platform/www/lib/plugins/refnotes/refnote.php
diff options
context:
space:
mode:
Diffstat (limited to 'platform/www/lib/plugins/refnotes/refnote.php')
-rw-r--r--platform/www/lib/plugins/refnotes/refnote.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/platform/www/lib/plugins/refnotes/refnote.php b/platform/www/lib/plugins/refnotes/refnote.php
new file mode 100644
index 0000000..127cd18
--- /dev/null
+++ b/platform/www/lib/plugins/refnotes/refnote.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * Plugin RefNotes: Common base class for references and notes
+ *
+ * @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
+ * @author Mykola Ostrovskyy <dwpforge@gmail.com>
+ */
+
+////////////////////////////////////////////////////////////////////////////////////////////////////
+class refnotes_refnote {
+
+ protected $attributes;
+ protected $data;
+
+ /**
+ * Constructor
+ */
+ public function __construct($attributes = array(), $data = array()) {
+ $this->attributes = $attributes;
+ $this->data = $data;
+ }
+
+ /**
+ *
+ */
+ public function getAttributes() {
+ return $this->attributes;
+ }
+
+ /**
+ *
+ */
+ public function getAttribute($name, $default = '') {
+ return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default;
+ }
+
+ /**
+ *
+ */
+ public function getData() {
+ return $this->data;
+ }
+
+ /**
+ *
+ */
+ public function hasData() {
+ return !empty($this->data);
+ }
+}