XML_RPC
[ class tree: XML_RPC ] [ index: XML_RPC ] [ all elements ]

Class: XML_RPC_Server

Source Location: /XML_RPC-1.5.5/XML/RPC/Server.php

Class Overview


A server for receiving and replying to XML RPC requests


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1999-2001 Edd Dumbill, 2001-2010 The PHP Group

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 263]
A server for receiving and replying to XML RPC requests

  1.  $server = new XML_RPC_Server(
  2.      array(
  3.          'isan8' =>
  4.              array(
  5.                  'function' => 'is_8',
  6.                  'signature' =>
  7.                       array(
  8.                           array('boolean''int'),
  9.                           array('boolean''int''boolean'),
  10.                           array('boolean''string'),
  11.                           array('boolean''string''boolean'),
  12.                       ),
  13.                  'docstring' => 'Is the value an 8?'
  14.              ),
  15.      ),
  16.      1,
  17.      0
  18.  );



[ Top ]


Class Variables

$convert_payload_encoding =  false

[line 272]

Should the payload's content be passed through mb_convert_encoding()?

Type:   boolean


[ Top ]

$debug =  0

[line 291]

Debug mode (0 = off, 1 = on)

Type:   integer


[ Top ]

$dmap = array()

[line 278]

The dispatch map, listing the methods this server provides.

Type:   array


[ Top ]

$encoding =  ''

[line 285]

The present response's encoding

Type:   string


[ Top ]

$server_headers =  ''

[line 297]

The response's HTTP headers

Type:   string


[ Top ]

$server_payload =  ''

[line 303]

The response's XML payload

Type:   string


[ Top ]



Method Detail

XML_RPC_Server (Constructor)   [line 329]

void XML_RPC_Server( array $dispMap, [int $serviceNow = 1], [int $debug = 0])

Constructor for the XML_RPC_Server class

Parameters:

array   $dispMap   —  the dispatch map. An associative array explaining each function. The keys of the main array are the procedure names used by the clients. The value is another associative array that contains up to three elements:
  • The 'function' element's value is the name of the function or method that gets called. To define a class' method: 'class::method'.
  • The 'signature' element (optional) is an array describing the return values and parameters
  • The 'docstring' element (optional) is a string describing what the method does
int   $serviceNow   —  should the HTTP response be sent now? (1 = yes, 0 = no)
int   $debug   —  should debug output be displayed? (1 = yes, 0 = no)

[ Top ]

createServerHeaders   [line 469]

boolean createServerHeaders( )

Determines the HTTP headers and puts them in the $server_headers property

[ Top ]

createServerPayload   [line 447]

void createServerPayload( )

Generates the payload and puts it in the $server_payload property

If XML_RPC_Server::setConvertPayloadEncoding() was set to true, the payload gets passed through mb_convert_encoding() to ensure the payload matches the encoding set in the XML declaration. The encoding type can be manually set via XML_RPC_Message::setSendEncoding().


[ Top ]

echoInput   [line 654]

void echoInput( )

Echos back the input packet as a string value
  • Return: Useful for debugging.

[ Top ]

parseRequest   [line 538]

object a parseRequest( [ $data = ''])


Parameters:

   $data   — 

[ Top ]

serializeDebug   [line 352]

string serializeDebug( )

  • Return: the debug information if debug debug mode is on

[ Top ]

service   [line 404]

void service( )

Sends the response

The encoding and content-type are determined by XML_RPC_Message::getEncoding()


[ Top ]

setConvertPayloadEncoding   [line 384]

void setConvertPayloadEncoding( int $in)

Sets whether the payload's content gets passed through mb_convert_encoding()

Returns PEAR_ERROR object if mb_convert_encoding() isn't available.


Parameters:

int   $in   —  where 1 = on, 0 = off

[ Top ]

verifySignature   [line 484]

array verifySignature( $in, $sig)


Parameters:

   $in   — 
   $sig   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:44:32 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.