aboutsummaryrefslogtreecommitdiffstats
path: root/public/system/engine/registry.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/system/engine/registry.php')
-rw-r--r--public/system/engine/registry.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/public/system/engine/registry.php b/public/system/engine/registry.php
new file mode 100644
index 0000000..0646cc8
--- /dev/null
+++ b/public/system/engine/registry.php
@@ -0,0 +1,47 @@
+<?php
+/**
+ * @package OpenCart
+ * @author Daniel Kerr
+ * @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/)
+ * @license https://opensource.org/licenses/GPL-3.0
+ * @link https://www.opencart.com
+*/
+
+/**
+* Registry class
+*/
+final class Registry {
+ private $data = array();
+
+ /**
+ *
+ *
+ * @param string $key
+ *
+ * @return mixed
+ */
+ public function get($key) {
+ return (isset($this->data[$key]) ? $this->data[$key] : null);
+ }
+
+ /**
+ *
+ *
+ * @param string $key
+ * @param string $value
+ */
+ public function set($key, $value) {
+ $this->data[$key] = $value;
+ }
+
+ /**
+ *
+ *
+ * @param string $key
+ *
+ * @return bool
+ */
+ public function has($key) {
+ return isset($this->data[$key]);
+ }
+} \ No newline at end of file