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 / Boolean.php
blobc7ab613a74cd4f7102a0b4dfc28459c1b4ad58e9
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 class Boolean extends AbstractScalar
15 /**
16 * Set the value of a boolean native type
17 * We hold the boolean type as an integer (0 or 1)
19 * @param bool $value
21 public function __construct($value)
23 $this->type = self::XMLRPC_TYPE_BOOLEAN;
24 // Make sure the value is boolean and then convert it into a integer
25 // The double conversion is because a bug in the ZendOptimizer in PHP version 5.0.4
26 $this->value = (int)(bool) $value;
29 /**
30 * Return the value of this object, convert the XML-RPC native boolean value into a PHP boolean
32 * @return bool
34 public function getValue()
36 return (bool) $this->value;