CC-2166: Packaging Improvements. Moved the Zend app into airtime_mvc. It is now installed to /var/www/airtime. Storage is now set to /srv/airtime/stor. Utils are now installed to /usr/lib/airtime/utils/. Added install/airtime-dircheck.php as a simple test to see if everything is install/uninstalled correctly.
This commit is contained in:
parent
514777e8d2
commit
b11cbd8159
4546 changed files with 138 additions and 51 deletions
75
airtime_mvc/library/Zend/XmlRpc/Value/Array.php
Normal file
75
airtime_mvc/library/Zend/XmlRpc/Value/Array.php
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Array.php 20208 2010-01-11 22:37:37Z lars $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Collection
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Collection.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_Array extends Zend_XmlRpc_Value_Collection
|
||||
{
|
||||
/**
|
||||
* Set the value of an array native type
|
||||
*
|
||||
* @param array $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
$this->_type = self::XMLRPC_TYPE_ARRAY;
|
||||
parent::__construct($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generate the XML code that represent an array native MXL-RPC value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _generateXml()
|
||||
{
|
||||
$generator = $this->getGenerator();
|
||||
$generator->openElement('value')
|
||||
->openElement('array')
|
||||
->openElement('data');
|
||||
|
||||
if (is_array($this->_value)) {
|
||||
foreach ($this->_value as $val) {
|
||||
$val->generateXml();
|
||||
}
|
||||
}
|
||||
$generator->closeElement('data')
|
||||
->closeElement('array')
|
||||
->closeElement('value');
|
||||
|
||||
$this->_xml = (string)$generator;
|
||||
}
|
||||
}
|
||||
|
68
airtime_mvc/library/Zend/XmlRpc/Value/Base64.php
Normal file
68
airtime_mvc/library/Zend/XmlRpc/Value/Base64.php
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Base64.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Scalar
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Scalar.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_Base64 extends Zend_XmlRpc_Value_Scalar
|
||||
{
|
||||
|
||||
/**
|
||||
* Set the value of a base64 native type
|
||||
* We keep this value in base64 encoding
|
||||
*
|
||||
* @param string $value
|
||||
* @param bool $already_encoded If set, it means that the given string is already base64 encoded
|
||||
*/
|
||||
public function __construct($value, $alreadyEncoded = false)
|
||||
{
|
||||
$this->_type = self::XMLRPC_TYPE_BASE64;
|
||||
|
||||
$value = (string)$value; // Make sure this value is string
|
||||
if (!$alreadyEncoded) {
|
||||
$value = base64_encode($value); // We encode it in base64
|
||||
}
|
||||
$this->_value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of this object, convert the XML-RPC native base64 value into a PHP string
|
||||
* We return this value decoded (a normal string)
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return base64_decode($this->_value);
|
||||
}
|
||||
}
|
65
airtime_mvc/library/Zend/XmlRpc/Value/BigInteger.php
Normal file
65
airtime_mvc/library/Zend/XmlRpc/Value/BigInteger.php
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Integer.php 17753 2009-08-22 16:09:37Z lars $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Integer
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Integer.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_BigInteger extends Zend_XmlRpc_Value_Integer
|
||||
{
|
||||
/**
|
||||
* @var Zend_Crypt_Math_BigInteger
|
||||
*/
|
||||
protected $_integer;
|
||||
|
||||
/**
|
||||
* @param mixed $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
require_once 'Zend/Crypt/Math/BigInteger.php';
|
||||
$this->_integer = new Zend_Crypt_Math_BigInteger();
|
||||
$this->_value = $this->_integer->init($this->_value);
|
||||
|
||||
$this->_type = self::XMLRPC_TYPE_I8;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return bigint value object
|
||||
*
|
||||
* @return Zend_Crypt_Math_BigInteger
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->_integer;
|
||||
}
|
||||
}
|
63
airtime_mvc/library/Zend/XmlRpc/Value/Boolean.php
Normal file
63
airtime_mvc/library/Zend/XmlRpc/Value/Boolean.php
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Boolean.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Scalar
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Scalar.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_Boolean extends Zend_XmlRpc_Value_Scalar
|
||||
{
|
||||
|
||||
/**
|
||||
* Set the value of a boolean native type
|
||||
* We hold the boolean type as an integer (0 or 1)
|
||||
*
|
||||
* @param bool $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
$this->_type = self::XMLRPC_TYPE_BOOLEAN;
|
||||
// Make sure the value is boolean and then convert it into a integer
|
||||
// The double convertion is because a bug in the ZendOptimizer in PHP version 5.0.4
|
||||
$this->_value = (int)(bool)$value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of this object, convert the XML-RPC native boolean value into a PHP boolean
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return (bool)$this->_value;
|
||||
}
|
||||
}
|
73
airtime_mvc/library/Zend/XmlRpc/Value/Collection.php
Normal file
73
airtime_mvc/library/Zend/XmlRpc/Value/Collection.php
Normal file
|
@ -0,0 +1,73 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Collection.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
abstract class Zend_XmlRpc_Value_Collection extends Zend_XmlRpc_Value
|
||||
{
|
||||
|
||||
/**
|
||||
* Set the value of a collection type (array and struct) native types
|
||||
*
|
||||
* @param array $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
$values = (array)$value; // Make sure that the value is an array
|
||||
foreach ($values as $key => $value) {
|
||||
// If the elements of the given array are not Zend_XmlRpc_Value objects,
|
||||
// we need to convert them as such (using auto-detection from PHP value)
|
||||
if (!$value instanceof parent) {
|
||||
$value = self::getXmlRpcValue($value, self::AUTO_DETECT_TYPE);
|
||||
}
|
||||
$this->_value[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the value of this object, convert the XML-RPC native collection values into a PHP array
|
||||
*
|
||||
* @return arary
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
$values = (array)$this->_value;
|
||||
foreach ($values as $key => $value) {
|
||||
/* @var $value Zend_XmlRpc_Value */
|
||||
$values[$key] = $value->getValue();
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
}
|
91
airtime_mvc/library/Zend/XmlRpc/Value/DateTime.php
Normal file
91
airtime_mvc/library/Zend/XmlRpc/Value/DateTime.php
Normal file
|
@ -0,0 +1,91 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: DateTime.php 20278 2010-01-14 14:48:59Z ralph $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Scalar
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Scalar.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_DateTime extends Zend_XmlRpc_Value_Scalar
|
||||
{
|
||||
/**
|
||||
* PHP compatible format string for XML/RPC datetime values
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_phpFormatString = 'Ymd\\TH:i:s';
|
||||
|
||||
/**
|
||||
* ISO compatible format string for XML/RPC datetime values
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $_isoFormatString = 'YYYYMMddTHH:mm:ss';
|
||||
|
||||
/**
|
||||
* Set the value of a dateTime.iso8601 native type
|
||||
*
|
||||
* The value is in iso8601 format, minus any timezone information or dashes
|
||||
*
|
||||
* @param mixed $value Integer of the unix timestamp or any string that can be parsed
|
||||
* to a unix timestamp using the PHP strtotime() function
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
$this->_type = self::XMLRPC_TYPE_DATETIME;
|
||||
|
||||
if ($value instanceof Zend_Date) {
|
||||
$this->_value = $value->toString($this->_isoFormatString);
|
||||
} elseif ($value instanceof DateTime) {
|
||||
$this->_value = $value->format($this->_phpFormatString);
|
||||
} elseif (is_numeric($value)) { // The value is numeric, we make sure it is an integer
|
||||
$this->_value = date($this->_phpFormatString, (int)$value);
|
||||
} else {
|
||||
$timestamp = strtotime($value);
|
||||
if ($timestamp === false || $timestamp == -1) { // cannot convert the value to a timestamp
|
||||
require_once 'Zend/XmlRpc/Value/Exception.php';
|
||||
throw new Zend_XmlRpc_Value_Exception('Cannot convert given value \''. $value .'\' to a timestamp');
|
||||
}
|
||||
|
||||
$this->_value = date($this->_phpFormatString, $timestamp); // Convert the timestamp to iso8601 format
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of this object as iso8601 dateTime value
|
||||
*
|
||||
* @return int As a Unix timestamp
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->_value;
|
||||
}
|
||||
}
|
62
airtime_mvc/library/Zend/XmlRpc/Value/Double.php
Normal file
62
airtime_mvc/library/Zend/XmlRpc/Value/Double.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Double.php 21159 2010-02-23 17:56:52Z matthew $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Scalar
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Scalar.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_Double extends Zend_XmlRpc_Value_Scalar
|
||||
{
|
||||
|
||||
/**
|
||||
* Set the value of a double native type
|
||||
*
|
||||
* @param float $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
$this->_type = self::XMLRPC_TYPE_DOUBLE;
|
||||
$precision = (int)ini_get('precision');
|
||||
$formatString = '%1.' . $precision . 'F';
|
||||
$this->_value = rtrim(sprintf($formatString, (float)$value), '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of this object, convert the XML-RPC native double value into a PHP float
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return (float)$this->_value;
|
||||
}
|
||||
}
|
39
airtime_mvc/library/Zend/XmlRpc/Value/Exception.php
Normal file
39
airtime_mvc/library/Zend/XmlRpc/Value/Exception.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Exception
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Exception.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_Exception extends Zend_XmlRpc_Exception
|
||||
{}
|
||||
|
65
airtime_mvc/library/Zend/XmlRpc/Value/Integer.php
Normal file
65
airtime_mvc/library/Zend/XmlRpc/Value/Integer.php
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Integer.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Scalar
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Scalar.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_Integer extends Zend_XmlRpc_Value_Scalar
|
||||
{
|
||||
|
||||
/**
|
||||
* Set the value of an integer native type
|
||||
*
|
||||
* @param int $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
if ($value > PHP_INT_MAX) {
|
||||
require_once 'Zend/XmlRpc/Value/Exception.php';
|
||||
throw new Zend_XmlRpc_Value_Exception('Overlong integer given');
|
||||
}
|
||||
|
||||
$this->_type = self::XMLRPC_TYPE_INTEGER;
|
||||
$this->_value = (int)$value; // Make sure this value is integer
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of this object, convert the XML-RPC native integer value into a PHP integer
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->_value;
|
||||
}
|
||||
}
|
60
airtime_mvc/library/Zend/XmlRpc/Value/Nil.php
Normal file
60
airtime_mvc/library/Zend/XmlRpc/Value/Nil.php
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Nil.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Scalar
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Scalar.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_Nil extends Zend_XmlRpc_Value_Scalar
|
||||
{
|
||||
|
||||
/**
|
||||
* Set the value of a nil native type
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->_type = self::XMLRPC_TYPE_NIL;
|
||||
$this->_value = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of this object, convert the XML-RPC native nill value into a PHP NULL
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
55
airtime_mvc/library/Zend/XmlRpc/Value/Scalar.php
Normal file
55
airtime_mvc/library/Zend/XmlRpc/Value/Scalar.php
Normal file
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Scalar.php 20208 2010-01-11 22:37:37Z lars $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
abstract class Zend_XmlRpc_Value_Scalar extends Zend_XmlRpc_Value
|
||||
{
|
||||
/**
|
||||
* Generate the XML code that represent a scalar native MXL-RPC value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _generateXml()
|
||||
{
|
||||
$generator = $this->getGenerator();
|
||||
|
||||
$generator->openElement('value')
|
||||
->openElement($this->_type, $this->_value)
|
||||
->closeElement($this->_type)
|
||||
->closeElement('value');
|
||||
|
||||
$this->_xml = (string)$generator;
|
||||
}
|
||||
}
|
60
airtime_mvc/library/Zend/XmlRpc/Value/String.php
Normal file
60
airtime_mvc/library/Zend/XmlRpc/Value/String.php
Normal file
|
@ -0,0 +1,60 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: String.php 20096 2010-01-06 02:05:09Z bkarwin $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Scalar
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Scalar.php';
|
||||
|
||||
/**
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_String extends Zend_XmlRpc_Value_Scalar
|
||||
{
|
||||
|
||||
/**
|
||||
* Set the value of a string native type
|
||||
*
|
||||
* @param string $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
$this->_type = self::XMLRPC_TYPE_STRING;
|
||||
|
||||
// Make sure this value is string and all XML characters are encoded
|
||||
$this->_value = (string)$value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the value of this object, convert the XML-RPC native string value into a PHP string
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return (string)$this->_value;
|
||||
}
|
||||
}
|
76
airtime_mvc/library/Zend/XmlRpc/Value/Struct.php
Normal file
76
airtime_mvc/library/Zend/XmlRpc/Value/Struct.php
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?php
|
||||
/**
|
||||
* Zend Framework
|
||||
*
|
||||
* LICENSE
|
||||
*
|
||||
* This source file is subject to the new BSD license that is bundled
|
||||
* with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://framework.zend.com/license/new-bsd
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@zend.com so we can send you a copy immediately.
|
||||
*
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Struct.php 20208 2010-01-11 22:37:37Z lars $
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Zend_XmlRpc_Value_Collection
|
||||
*/
|
||||
require_once 'Zend/XmlRpc/Value/Collection.php';
|
||||
|
||||
|
||||
/**
|
||||
* @category Zend
|
||||
* @package Zend_XmlRpc
|
||||
* @subpackage Value
|
||||
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
*/
|
||||
class Zend_XmlRpc_Value_Struct extends Zend_XmlRpc_Value_Collection
|
||||
{
|
||||
/**
|
||||
* Set the value of an struct native type
|
||||
*
|
||||
* @param array $value
|
||||
*/
|
||||
public function __construct($value)
|
||||
{
|
||||
$this->_type = self::XMLRPC_TYPE_STRUCT;
|
||||
parent::__construct($value);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generate the XML code that represent struct native MXL-RPC value
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function _generateXML()
|
||||
{
|
||||
$generator = $this->getGenerator();
|
||||
$generator->openElement('value')
|
||||
->openElement('struct');
|
||||
|
||||
if (is_array($this->_value)) {
|
||||
foreach ($this->_value as $name => $val) {
|
||||
/* @var $val Zend_XmlRpc_Value */
|
||||
$generator->openElement('member')
|
||||
->openElement('name', $name)
|
||||
->closeElement('name');
|
||||
$val->generateXml();
|
||||
$generator->closeElement('member');
|
||||
}
|
||||
}
|
||||
$generator->closeElement('struct')
|
||||
->closeElement('value');
|
||||
$this->_xml = (string)$generator;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue