aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/XMLRPCResponse.php
blob: 1dea8d682d9dfc3936338b429b9bc8c0bd50aa17 (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
<?php

/**
 * @class XMLRPCResponse XML-RPC Response. 
 * @author Curverider Ltd
 */
abstract class XMLRPCResponse
{
	/** An array of parameters */
	protected $parameters = array();
	
	/**
	 * Add a parameter here.
	 *
	 * @param XMLRPCParameter $param The parameter.
	 */
	public function addParameter(XMLRPCParameter $param)
	{
		if (!is_array($this->parameters))
			$this->parameters = array();
			
		$this->parameters[] = $param;
	}

	public function addInt($value) { $this->addParameter(new XMLRPCIntParameter($value)); }
	public function addString($value) { $this->addParameter(new XMLRPCStringParameter($value)); }
	public function addDouble($value) { $this->addParameter(new XMLRPCDoubleParameter($value)); }
	public function addBoolean($value) { $this->addParameter(new XMLRPCBoolParameter($value)); }
}