aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/XMLRPCDoubleParameter.php
blob: b7834650eac625b0aa7ac5f14e5bfd323cf3c536 (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
/**
 * A double precision signed floating point number.
 *
 * @package    Elgg.Core
 * @subpackage XMLRPC
 */
class XMLRPCDoubleParameter extends XMLRPCParameter {

	/**
	 * New XML Double
	 *
	 * @param int $value Value
	 */
	function __construct($value) {
		parent::__construct();

		$this->value = (float)$value;
	}

	/**
	 * Convert to string
	 *
	 * @return string
	 */
	function __toString() {
		return "<value><double>{$this->value}</double></value>";
	}
}