Added the zend framework 2 library, the path is specified in line no.26 in zend_modul...
[openemr.git] / interface / modules / zend_modules / library / Zend / XmlRpc / Value / Integer.php
blob38189f4a4af7d580afb1081212881175bd4b2e1e
1 <?php
2 /**
3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
8 */
10 namespace Zend\XmlRpc\Value;
12 use Zend\XmlRpc\Exception;
14 class Integer extends AbstractScalar
17 /**
18 * Set the value of an integer native type
20 * @param int $value
21 * @throws Exception\ValueException
23 public function __construct($value)
25 if ($value > PHP_INT_MAX) {
26 throw new Exception\ValueException('Overlong integer given');
29 $this->type = self::XMLRPC_TYPE_INTEGER;
30 $this->value = (int) $value; // Make sure this value is integer
33 /**
34 * Return the value of this object, convert the XML-RPC native integer value into a PHP integer
36 * @return int
38 public function getValue()
40 return $this->value;