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

Class: XML_RPC_Server

Source Location: /XML_RPC-1.5.1/Server.php

Class Overview


A server for receiving and replying to XML RPC requests


Author(s):

Version:

  • Release: 1.5.1

Copyright:

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

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 276]
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 285]

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

Type:   boolean


[ Top ]

$debug =  0

[line 304]

Debug mode (0 = off, 1 = on)

Type:   integer


[ Top ]

$dmap = array()

[line 291]

The dispatch map, listing the methods this server provides.

Type:   array


[ Top ]

$encoding =  ''

[line 298]

The present response's encoding

Type:   string


[ Top ]

$server_headers =  ''

[line 310]

The response's HTTP headers

Type:   string


[ Top ]

$server_payload =  ''

[line 316]

The response's XML payload

Type:   string


[ Top ]



Method Detail

XML_RPC_Server (Constructor)   [line 342]

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 482]

boolean createServerHeaders( )

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

[ Top ]

createServerPayload   [line 460]

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 667]

void echoInput( )

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

[ Top ]

parseRequest   [line 551]

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


Parameters:

   $data   — 

[ Top ]

serializeDebug   [line 365]

string serializeDebug( )

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

[ Top ]

service   [line 417]

void service( )

Sends the response

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


[ Top ]

setConvertPayloadEncoding   [line 397]

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 497]

array verifySignature( $in, $sig)


Parameters:

   $in   — 
   $sig   — 

[ Top ]


Documentation generated on Thu, 10 Dec 2015 05:42:30 +0000 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.