public function compose(SQL $SQL){

		$tokens = [];
		$query_string = '';

		foreach($this->_values as $name => $value){

			// Throws an exception on invalid name/value

			$this->_checkParameter($name, $value);

			assert('is_array($this->_parameters[$name])');

			$prepared_value = $this->_prepareValue($value, $SQL,
				$this->_parameters[$name]['identifier']);
			$tokens[$this->_parameters[$name]['uid']] = $prepared_value;
		}

		foreach($this->_query as $query_part){

			list($token, $value) = explode(' ', $query_part, 2);

			switch($token){

				case 'P':

					if(isset($tokens[$value])){

						$query_string .= $tokens[$value];
					}

					break;

				case 'T':

					$query_string .= $value;

					break;

				default: ExceptionHandler::notice("Invalid token $token");
			}
		}

		return $query_string;
	}