aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/QueryComponent.php
blob: cfe7683b1a17ee6e836e43cea4357090e639507a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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;
	}
}