|
| __construct (array $options=array()) |
|
| parse ($data, $returnType=self::RETURN_XMLRPCVALS, $accept=3, $options=array()) |
|
| xmlrpc_cd ($parser, $data) |
| xml parser handler function for character data.
|
|
| xmlrpc_dh ($parser, $data) |
| xml parser handler function for 'other stuff', ie.
|
|
| xmlrpc_ee ($parser, $name, $rebuildXmlrpcvals=1) |
| xml parser handler function for close element tags.
|
|
| xmlrpc_ee_epi ($parser, $name) |
| Used in decoding xmlrpc requests/responses while building xmlrpc-extension Values (plain php for all but base64 and datetime).
|
|
| xmlrpc_ee_fast ($parser, $name) |
| Used in decoding xmlrpc requests/responses without rebuilding xmlrpc Values.
|
|
| xmlrpc_se ($parser, $name, $attrs, $acceptSingleVals=false) |
| xml parser handler function for opening element tags.
|
|
| xmlrpc_se_any ($parser, $name, $attrs) |
| xml parser handler function for opening element tags.
|
|
|
static | guessEncoding ($httpHeader='', $xmlChunk='', $encodingPrefs=null) |
| xml charset encoding guessing helper function.
|
|
|
| $_xh |
|
| $xmlrpc_valid_parents |
|
const | ACCEPT_FAULT = 8 |
|
const | ACCEPT_REQUEST = 1 |
|
const | ACCEPT_RESPONSE = 2 |
|
const | ACCEPT_VALUE = 4 |
|
const | RETURN_EPIVALS = 'epivals' |
|
const | RETURN_PHP = 'phpvals' |
|
const | RETURN_XMLRPCVALS = 'xmlrpcvals' |
|
|
int | $accept = 3 |
| $accept self::ACCEPT_REQUEST | self::ACCEPT_RESPONSE by default
|
|
int | $maxChunkLength = 4194304 |
| $maxChunkLength 4 MB by default.
|
|
array | $parsing_options = array() |
| $parsing_options
|
|
◆ __construct()
PhpXmlRpc\Helper\XMLParser::__construct |
( |
array | $options = array() | ) |
|
- Parameters
-
array | $options | passed to the xml parser |
◆ guessEncoding()
static PhpXmlRpc\Helper\XMLParser::guessEncoding |
( |
| $httpHeader = '', |
|
|
| $xmlChunk = '', |
|
|
| $encodingPrefs = null ) |
|
static |
xml charset encoding guessing helper function.
Tries to determine the charset encoding of an XML chunk received over HTTP. NB: according to the spec (RFC 3023), if text/xml content-type is received over HTTP without a content-type, we SHOULD assume it is strictly US-ASCII. But we try to be more tolerant of non conforming (legacy?) clients/servers, which will be most probably using UTF-8 anyway... In order of importance checks:
- http headers
- BOM
- XML declaration
- guesses using mb_detect_encoding()
- Parameters
-
string | $httpHeader | the http Content-type header |
string | $xmlChunk | xml content buffer |
string | $encodingPrefs | comma separated list of character encodings to be used as default (when mb extension is enabled). This can also be set globally using PhpXmlRpc::$xmlrpc_detectencodings |
- Return values
-
string | the encoding determined. Null if it can't be determined and mbstring is enabled, PhpXmlRpc::$xmlrpc_defencoding if it can't be determined and mbstring is not enabled |
- Todo
- explore usage of mb_http_input(): does it detect http headers + post data? if so, use it instead of hand-detection!!!
◆ parse()
PhpXmlRpc\Helper\XMLParser::parse |
( |
| $data, |
|
|
| $returnType = self::RETURN_XMLRPCVALS, |
|
|
| $accept = 3, |
|
|
| $options = array() ) |
- Parameters
-
string | $data | |
string | $returnType | |
int | $accept | a bit-combination of self::ACCEPT_REQUEST, self::ACCEPT_RESPONSE, self::ACCEPT_VALUE |
array | $options | |
◆ xmlrpc_dh()
PhpXmlRpc\Helper\XMLParser::xmlrpc_dh |
( |
| $parser, |
|
|
| $data ) |
xml parser handler function for 'other stuff', ie.
not char data or element start/end tag. In fact it only gets called on unknown entities...
◆ xmlrpc_se_any()
PhpXmlRpc\Helper\XMLParser::xmlrpc_se_any |
( |
| $parser, |
|
|
| $name, |
|
|
| $attrs ) |
xml parser handler function for opening element tags.
Used in decoding xml chunks that might represent single xmlrpc values as well as requests, responses.
- Deprecated
- Parameters
-
resource | $parser | |
| $name | |
| $attrs | |
◆ $_xh
PhpXmlRpc\Helper\XMLParser::$_xh |
Initial value:
'ac' => '',
'isf' => 0,
'isf_reason' => '',
'value' => null,
'method' => false,
'rt' => '',
)
◆ $maxChunkLength
int PhpXmlRpc\Helper\XMLParser::$maxChunkLength = 4194304 |
|
protected |
$maxChunkLength 4 MB by default.
Any value below 10MB should be good
◆ $xmlrpc_valid_parents
PhpXmlRpc\Helper\XMLParser::$xmlrpc_valid_parents |
Initial value:
'VALUE' =>
array(
'MEMBER',
'DATA',
'PARAM',
'FAULT'),
'BOOLEAN' =>
array(
'VALUE'),
'EX:I8' =>
array(
'VALUE'),
'STRING' =>
array(
'VALUE'),
'DOUBLE' =>
array(
'VALUE'),
'DATETIME.ISO8601' =>
array(
'VALUE'),
'BASE64' =>
array(
'VALUE'),
'MEMBER' =>
array(
'STRUCT'),
'NAME' =>
array(
'MEMBER'),
'DATA' =>
array(
'ARRAY'),
'ARRAY' =>
array(
'VALUE'),
'STRUCT' =>
array(
'VALUE'),
'PARAM' =>
array(
'PARAMS'),
'METHODNAME' =>
array(
'METHODCALL'),
'PARAMS' =>
array(
'METHODCALL',
'METHODRESPONSE'),
'FAULT' =>
array(
'METHODRESPONSE'),
'EX:NIL' =>
array(
'VALUE'),
)
The documentation for this class was generated from the following file:
- lib/phpxmlrpc/Helper/XMLParser.php