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
10 namespace Zend\XmlRpc\Value
;
12 use Zend\XmlRpc\Exception
;
14 class Integer extends AbstractScalar
18 * Set the value of an integer native type
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
34 * Return the value of this object, convert the XML-RPC native integer value into a PHP integer
38 public function getValue()