aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/XMLRPCBoolParameter.php
blob: c2714ceffeeac5554f429c13a59e110b6fa9c0f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
/**
 * @class XMLRPCBoolParameter A boolean.
 * @author Curverider Ltd
 */
class XMLRPCBoolParameter extends XMLRPCParameter
{
	function __construct($value)
	{
		parent::__construct();
		
		$this->value = (bool)$value; 
	}
	
	function __toString() 
	{
		$code = ($this->value) ? "1" : "0";
		return "<value><boolean>{$code}</boolean></value>";
	}
}