aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/XMLRPCBoolParameter.php
blob: 3a1b00b88808f9eaff3a91df87e00e2441c63953 (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>";
	}
}