aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/QueryComponent.php
blob: 148d07a2c7aa0ea8435b62e07f7abed17d0a7a01 (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;
	}
}