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

Class: XML_RPC_Message

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

Class Overview

XML_RPC_Base
   |
   --XML_RPC_Message

The methods and properties for composing XML RPC messages


Author(s):

Version:

  • Release: @package_version@

Copyright:

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

Variables

Methods


Inherited Variables

Inherited Methods

Class: XML_RPC_Base

XML_RPC_Base::isError()
Tell whether something is a PEAR_Error object
XML_RPC_Base::raiseError()
PEAR Error handling

Class Details

[line 1138]
The methods and properties for composing XML RPC messages


[ Top ]


Class Variables

$convert_payload_encoding =  false

[line 1147]

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

Type:   boolean


[ Top ]

$debug =  0

[line 1153]

The current debug mode (1 = on, 0 = off)

Type:   integer


[ Top ]

$methodname =  ''

[line 1170]

The method presently being evaluated

Type:   string


[ Top ]

$params = array()

[line 1175]


Type:   array


[ Top ]

$payload =  ''

[line 1181]

The XML message being generated

Type:   string


[ Top ]

$remove_extra_lines =  true

[line 1188]

Should extra line breaks be removed from the payload?
  • Since: Property available since Release 1.4.6

Type:   boolean


[ Top ]

$response_payload =  ''

[line 1195]

The XML response from the remote server
  • Since: Property available since Release 1.4.6

Type:   string


[ Top ]

$send_encoding =  ''

[line 1164]

The encoding to be used for outgoing messages

Defaults to the value of $GLOBALS['XML_RPC_defencoding']


Type:   string


[ Top ]



Method Detail

XML_RPC_Message (Constructor)   [line 1201]

void XML_RPC_Message( $meth, [ $pars = 0])


Parameters:

   $meth     
   $pars     

[ Top ]

addParam   [line 1304]

void addParam( $par)


Parameters:

   $par     

[ Top ]

createPayload   [line 1260]

void createPayload( )

Fills the XML_RPC_Message::$payload property

Part of the process makes sure all line endings are in DOS format (CRLF), which is probably required by specifications.

If XML_RPC_Message::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 ]

getEncoding   [line 1392]

string getEncoding( string $data)

Determine the XML's encoding via the encoding attribute in the XML declaration

If the encoding parameter is not set or is not ISO-8859-1, UTF-8 or US-ASCII, $XML_RPC_defencoding will be returned.


Parameters:

string   $data     the XML that will be parsed

[ Top ]

getNumParams   [line 1336]

int getNumParams( )

  • Return: the number of parameters

[ Top ]

getParam   [line 1319]

object the getParam( int $i)

Obtains an XML_RPC_Value object for the given parameter
  • Return: XML_RPC_Value object. If the parameter doesn't exist, an XML_RPC_Response object.
  • Since: Returns XML_RPC_Response object on error since Release 1.3.0

Parameters:

int   $i     the index number of the parameter to obtain

[ Top ]

method   [line 1284]

string method( [ $meth = ''])

  • Return: the name of the method

Parameters:

   $meth     

[ Top ]

parseResponse   [line 1430]

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

  • Return: new XML_RPC_Response object

Parameters:

   $data     

[ Top ]

parseResponseFile   [line 1418]

object a parseResponseFile( $fp)

  • Return: new XML_RPC_Response object

Parameters:

   $fp     

[ Top ]

serialize   [line 1295]

string serialize( )

  • Return: the payload

[ Top ]

setConvertPayloadEncoding   [line 1354]

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 ]

setSendEncoding   [line 1373]

void setSendEncoding( string $type)

Sets the XML declaration's encoding attribute

Parameters:

string   $type     the encoding type (ISO-8859-1, UTF-8 or US-ASCII)

[ Top ]

xml_footer   [line 1237]

string xml_footer( )

  • Return: the closing </methodCall> tag

[ Top ]

xml_header   [line 1223]

string xml_header( )

Produces the XML declaration including the encoding attribute

The encoding is determined by this class' $send_encoding property. If the $send_encoding property is not set, use $GLOBALS['XML_RPC_defencoding'].


[ Top ]


Documentation generated on Sat, 27 Aug 2011 03:00:04 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.