aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/QueryComponent.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/QueryComponent.php')
-rw-r--r--engine/classes/QueryComponent.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/engine/classes/QueryComponent.php b/engine/classes/QueryComponent.php
new file mode 100644
index 000000000..cfe7683b1
--- /dev/null
+++ b/engine/classes/QueryComponent.php
@@ -0,0 +1,42 @@
+<?php
+/**
+ * @class QueryComponent Query component superclass.
+ * Component of a query.
+ * @author Curverider Ltd
+ * @see Query
+ */
+abstract class QueryComponent
+{
+ /**
+ * Associative array of fields and values
+ */
+ private $fields;
+
+ function __construct()
+ {
+ $this->fields = array();
+ }
+
+ /**
+ * Class member get overloading
+ *
+ * @param string $name
+ * @return mixed
+ */
+ function __get($name) {
+ return $this->fields[$name];
+ }
+
+ /**
+ * Class member set overloading
+ *
+ * @param string $name
+ * @param mixed $value
+ * @return void
+ */
+ function __set($name, $value) {
+ $this->fields[$name] = $value;
+
+ return true;
+ }
+}