Version 3.2.3
This commit is contained in:
1 parent
ae5c01cc78
commit
78706903a2
2641 files changed
+228363
-201264
No files matched your search
@@ -3,19 +3,19 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board v3.2.3
|
||||
* This class can act as an API server, handling API requests
|
||||
* Last Updated: $Date: 2010-08-20 17:38:30 -0400 (Fri, 20 Aug 2010) $
|
||||
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @license This is NULLED!
|
||||
* @package IP.Board
|
||||
* @subpackage Kernel
|
||||
* @link http://www.invisionpower.com
|
||||
* @link http://hatynka.in
|
||||
* @since Friday 6th January 2006 (12:24)
|
||||
* @version $Revision: 450 $
|
||||
* @version $Revision: 8644 $
|
||||
*
|
||||
* Examples of sending and receiving API data
|
||||
* <code>
|
||||
@@ -48,7 +48,6 @@ class classApiServer
|
||||
/**
|
||||
* XML-RPC class
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $xmlrpc;
|
||||
@@ -56,7 +55,6 @@ class classApiServer
|
||||
/**
|
||||
* Raw incoming data
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
public $raw_request;
|
||||
@@ -64,31 +62,27 @@ class classApiServer
|
||||
/**
|
||||
* Requested method name
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $method_name;
|
||||
protected $method_name;
|
||||
|
||||
/**
|
||||
* Raw data incoming
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $_raw_in_data;
|
||||
protected $_raw_in_data;
|
||||
|
||||
/**
|
||||
* Raw data output
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $_raw_out_data;
|
||||
protected $_raw_out_data;
|
||||
|
||||
/**
|
||||
* Method params
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $params = array();
|
||||
@@ -96,23 +90,20 @@ class classApiServer
|
||||
/**
|
||||
* XML-RPC serialized 64 key
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $serialized_key = '__serialized64__';
|
||||
protected $serialized_key = '__serialized64__';
|
||||
|
||||
/**
|
||||
* Server function object
|
||||
*
|
||||
* @access private
|
||||
* @var object
|
||||
*/
|
||||
private $xml_server;
|
||||
protected $xml_server;
|
||||
|
||||
/**
|
||||
* Return cookie information
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $cookies = array();
|
||||
@@ -120,15 +111,13 @@ class classApiServer
|
||||
/**
|
||||
* XML-RPC cookie serialized 64 key
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $cookie_serialized_key = '__cookie__serialized64__';
|
||||
protected $cookie_serialized_key = '__cookie__serialized64__';
|
||||
|
||||
/**#@+
|
||||
* HTTP Auth required
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $auth_user = '';
|
||||
@@ -138,7 +127,6 @@ class classApiServer
|
||||
/**
|
||||
* Errors array
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $errors = array();
|
||||
@@ -146,14 +134,13 @@ class classApiServer
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
if ( ! is_object( $this->xmlrpc ) )
|
||||
{
|
||||
require_once( IPS_KERNEL_PATH . '/classXmlRpc.php' );
|
||||
require_once( IPS_KERNEL_PATH . '/classXmlRpc.php' );/*noLibHook*/
|
||||
$this->xmlrpc = new classXmlRpc();
|
||||
}
|
||||
|
||||
@@ -163,7 +150,6 @@ class classApiServer
|
||||
/**
|
||||
* Add object map to this class
|
||||
*
|
||||
* @access public
|
||||
* @param string Incoming data
|
||||
* @return string api
|
||||
*/
|
||||
@@ -199,7 +185,6 @@ class classApiServer
|
||||
/**
|
||||
* Add object map to this class
|
||||
*
|
||||
* @access public
|
||||
* @param object Server class object
|
||||
* @param string Document type
|
||||
* @return boolean
|
||||
@@ -223,7 +208,6 @@ class classApiServer
|
||||
/**
|
||||
* Get the XML-RPC data
|
||||
*
|
||||
* @access public
|
||||
* @param string Incoming data
|
||||
* @return mixed Boolean, Output error
|
||||
*/
|
||||
@@ -304,9 +288,8 @@ class classApiServer
|
||||
/**
|
||||
* Set a cookie for the API request
|
||||
*
|
||||
* @access public
|
||||
* @param array Array of params to send
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function apiAddCookieData( $data )
|
||||
{
|
||||
@@ -319,11 +302,10 @@ class classApiServer
|
||||
/**
|
||||
* Return API Request
|
||||
*
|
||||
* @access public
|
||||
* @param array Array of params to send
|
||||
* @param int Complex data: Encode before sending
|
||||
* @param array Forced data type mapping
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function apiSendReply( $data=array(), $complex_data=0, $force=array() )
|
||||
{
|
||||
@@ -385,10 +367,9 @@ class classApiServer
|
||||
/**
|
||||
* Return API Request (ERROR)
|
||||
*
|
||||
* @access public
|
||||
* @param int Error Code
|
||||
* @param string Error message
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function apiSendError( $error_code, $error_msg )
|
||||
{
|
||||
@@ -398,9 +379,8 @@ class classApiServer
|
||||
/**
|
||||
* Decode API Request
|
||||
*
|
||||
* @access public
|
||||
* @param string Raw data picked up
|
||||
* @return void
|
||||
* @return @e void
|
||||
*/
|
||||
public function apiDecodeRequest( $raw_data )
|
||||
{
|
||||
@@ -420,7 +400,6 @@ class classApiServer
|
||||
/**
|
||||
* Send API Request
|
||||
*
|
||||
* @access public
|
||||
* @param string URL to send request to
|
||||
* @param string Method name for API to pick up
|
||||
* @param array Data to send
|
||||
@@ -485,7 +464,6 @@ class classApiServer
|
||||
/**
|
||||
* Process returned data
|
||||
*
|
||||
* @access public
|
||||
* @param array Raw array
|
||||
* @return array Cleaned array
|
||||
*/
|
||||
@@ -572,11 +550,10 @@ class classApiServer
|
||||
/**
|
||||
* Encode array
|
||||
*
|
||||
* @access private
|
||||
* @param array Raw array
|
||||
* @return string Encoded string
|
||||
*/
|
||||
private function _encodeBase64Array( $array )
|
||||
protected function _encodeBase64Array( $array )
|
||||
{
|
||||
return base64_encode( serialize( $array ) );
|
||||
}
|
||||
@@ -584,11 +561,10 @@ class classApiServer
|
||||
/**
|
||||
* Decode array
|
||||
*
|
||||
* @access private
|
||||
* @param string Encoded string
|
||||
* @return array Raw array
|
||||
*/
|
||||
private function _decodeBase64Array( $data )
|
||||
protected function _decodeBase64Array( $data )
|
||||
{
|
||||
if ( ! is_array( $data ) )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user