|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00027 require_once 'Zend/XmlRpc/Value/Scalar.php'; 00028 00029 00037 class Zend_XmlRpc_Value_Double extends Zend_XmlRpc_Value_Scalar 00038 { 00039 00045 public function __construct($value) 00046 { 00047 $this->_type = self::XMLRPC_TYPE_DOUBLE; 00048 $precision = (int)ini_get('precision'); 00049 $formatString = '%1.' . $precision . 'F'; 00050 $this->_value = rtrim(sprintf($formatString, (float)$value), '0'); 00051 } 00052 00058 public function getValue() 00059 { 00060 return (float)$this->_value; 00061 } 00062 }