PHPXMLRPC 4.10.3

Markers

Table of Contents

Client.php 8
Encoder.php 6
Helper/Charset.php 9
Helper/Http.php 1
Helper/Logger.php 2
Helper/XMLParser.php 9
PhpXmlRpc.php 2
Request.php 6
Response.php 1
Server.php 3
Value.php 6
Wrapper.php 28

Client.php

Type Line Description
TODO 677 check correctness of urlencoding cookie value (copied from php way of doing it, but php is generally sending response not requests. We do the opposite...)
TODO 677 strip invalid chars from cookie name? As per RFC 6265, we should follow RFC 2616, Section 2.2
TODO 677 drop/rename $port parameter. Cookies are not isolated by port!
TODO 677 feature-creep allow storing 'expires', 'secure', 'httponly' and 'samesite' cookie attributes (we could do as php, and allow $path to be an array of attributes...)
TODO 803 allow throwing exceptions instead of returning responses in case of failed calls and/or Fault responses
TODO 803 refactor: we now support many options besides connection timeout and http version to use. Why only privilege those?
TODO 1151 the $path arg atm is ignored. What to do if it is != $this->path?
TODO 1235 allow this method to either throw or return a Response, so that we can pass back to caller more info on errors

Encoder.php

Type Line Description
TODO 15 implement an interface
TODO 15 add class constants for the options values
TODO 293 is this a good name/class for this method? It does something quite different from 'decode' after all (returning objects vs returns plain php values)... In fact, it belongs rather to a Parser class
TODO 293 feature creep -- we should allow an option to return php native types instead of PhpXmlRpc objects instances
TODO 293 feature creep -- allow source charset to be passed in as an option, in case the xml misses its declaration
TODO 293 feature creep -- allow expected type (val/req/resp) to be passed in as an option

Charset.php

Type Line Description
TODO 12 implement an interface
TODO 71 add support for cp1252 as well as latin-2 .. latin-10 Optimization creep: instead of building all those tables on load, keep them ready-made php files which are not even included until needed
TODO 71 should we add to the latin-1 table the characters from cp_1252 range, i.e. 128 to 159 ? Those will NOT be present in true ISO-8859-1, but will save the unwary windows user from sending junk (though no luck when receiving them...) Note also that, apparently, while 'ISO/IEC 8859-1' has no characters defined for bytes 128 to 159, IANA ISO-8859-1 does have well-defined 'C1' control codes for those - wikipedia's page on latin-1 says: "ISO-8859-1 is the IANA preferred name for this standard when supplemented with the C0 and C1 control codes from ISO/IEC 6429." Check what mbstring/iconv do by default with those?
TODO 145 do a bit of basic benchmarking: strtr vs. str_replace, str_replace vs htmlspecialchars, hand-coded conversion vs mbstring when that is enabled
TODO 145 make use of iconv when it is available and mbstring is not
TODO 145 support aliases for charset names, eg ASCII, LATIN1, ISO-88591 (see f.e. polyfill-iconv for a list), but then take those into account as well in other methods, ie. isValidCharset)
TODO 145 when converting to ASCII, allow to choose whether to escape the range 0-31,127 (non-print chars) or not
TODO 145 allow picking different strategies to deal w. invalid chars? eg. source in latin-1 and chars 128-159
TODO 145 add support for escaping using CDATA sections? (add cdata start and end tokens, replace only ']]>' with ']]]]><![CDATA[>')

Http.php

Type Line Description
TODO 78 if $debug is < 0, we could avoid populating 'raw_data' in the returned value - but that would be a weird API... (note that we still need to always have headers parsed for content charset)

Logger.php

Type Line Description
TODO 9 implement an interface
TODO 9 make constructor private to force users to go through `instance()` ?

XMLParser.php

Type Line Description
TODO 24 implement an interface to allow for alternative implementations - make access to $_xh protected, return more high-level data structures - move the private parts of $_xh to the internal-use parsing-options config - add parseRequest, parseResponse, parseValue methods
TODO 24 if iconv() or mb_string() are available, we could allow to convert the received xml to a custom charset encoding while parsing, which is faster than doing it later by going over the rebuilt data structure
TODO 24 rename? This is an xml-rpc parser, not a generic xml parser...
TODO 154 refactor? we could 1. return the parsed data structure, and 2. move $returnType and $accept into options
TODO 154 feature-creep make it possible to pass in options overriding usage of PhpXmlRpc::$xmlrpc_XXX_format, so that parsing will be completely independent of global state. Note that it might incur a small perf hit...
TODO 890 as of 2023, the relevant RFC for XML Media Types is now 7303, and for HTTP it is 9110. Check if the order of precedence implemented here is still correct
TODO 890 explore usage of mb_http_input(): does it detect http headers + post data? if so, use it instead of hand-detection!!!
TODO 890 feature-creep make it possible to pass in options overriding usage of PhpXmlRpc static variables, to make the method independent of global state
TODO 978 rename to hasEncodingDeclaration

PhpXmlRpc.php

Type Line Description
TODO 305 this function does not import back xmlrpc_valid_parents and xml_iso88591_Entities
TODO 170 rename :'-(

Request.php

Type Line Description
TODO 25 feature creep - add a protected $httpRequest member, in the same way the Response has one
TODO 201 arsing Responses is not really the responsibility of the Request class. Maybe of the Client...
TODO 201 feature creep - add a flag to disable trying to parse the http headers
TODO 229 parsing Responses is not really the responsibility of the Request class. Maybe of the Client...
TODO 229 what about only populating 'raw_data' in httpResponse when debug mode is > 0?
TODO 229 feature creep - allow parsing data gotten from a stream pointer instead of a string: read it piecewise, looking first for separation between headers and body, then for charset indicators, server debug info and </methodResponse>. That would require a notable increase in code complexity...

Response.php

Type Line Description
TODO 58 add check that $val / $fCode / $fString is of correct type? We could at least log a warning for fishy cases... NB: as of now we do not do it, since it might be either an xml-rpc value or a plain php val, or a complete xml chunk, depending on usage of Client::send() inside which the constructor is called.

Server.php

Type Line Description
TODO 466 raise a warning if the user tries to register a 'system.' method
TODO 490 raise a warning if the user tries to register a 'system.' method
TODO 52 create class constants for these

Value.php

Type Line Description
TODO 123 arguably, as we have addArray to add elements to an Array value, and addStruct to add elements to a Struct value, we should not allow this method to add values to an Array. The 'scalar' in the method name refers to the expected state of the target object, not to the type of $val. Also, this works differently from addScalar/addStruct in that, when adding an element to an array, it wraps it into a new Value
TODO 123 rename?
TODO 182 add some checking for $values to be an array of xml-rpc values?
TODO 182 rename to addToArray?
TODO 213 add some checking for $values to be an array of xml-rpc values?
TODO 213 rename to addToStruct?

Wrapper.php

Type Line Description
TODO 22 use some better templating system for code generation?
TODO 22 implement method wrapping with preservation of php objs in calls
TODO 22 add support for 'epivals' mode
TODO 22 allow setting custom namespace for generated wrapping code
TODO 51 support notation `something[]` as 'array'
TODO 51 check if nil support is enabled when finding null
TODO 168 decide how to deal with params passed by ref in function definition: bomb out or allow?
TODO 168 finish using phpdoc info to build method sig if all params are named but out of order
TODO 168 add a check for params of 'resource' type
TODO 168 add some error logging when returning false?
TODO 168 what to do when the PHP function returns NULL? We are currently returning an empty string value...
TODO 168 add an option to suppress php warnings in invocation of user function, similar to server debug level 3?
TODO 168 add a verbatim_object_copy parameter to allow avoiding usage the same obj instance?
TODO 168 add an option to allow generated function to skip validation of number of parameters, as that is done by the server anyway
TODO 347 support better docs with multiple types separated by pipes by creating multiple signatures (this is questionable, as it might produce a big matrix of possible signatures with many such occurrences)
TODO 418 validate params? In theory all validation is left to the dispatch map...
TODO 418 add support for $catchWarnings
TODO 640 allow the generated function to be able to reuse an external Encoder instance instead of creating one on each invocation, for the case where all the generated functions will be saved as methods of a class
TODO 676 php allows many more characters in identifiers than the xml-rpc spec does. We should make sure to replace those (while trying to make sure we are not running in collisions)
TODO 746 allow caller to give us the method signature instead of querying for it, or just say 'skip it'
TODO 746 if we can not retrieve method signature, create a php function with varargs
TODO 746 if caller did not specify a specific sig, shall we support all of them? It might be hard (hence slow) to match based on type and number of arguments...
TODO 746 when wrapping methods without obj rebuilding, use return_type = 'phpvals' (faster)
TODO 746 allow creating functions which have an extra `$debug=0` parameter
TODO 862 should we allow usage of parameter simple_client_copy to mean 'do not clone' in this case?
TODO 1102 add support for anonymous classes in the 'buildIt' case for php > 7
TODO 1102 add method setDebug() to new class, to enable/disable debugging
TODO 1102 optimization - move the generated Encoder instance to be a property of the created class, instead of creating it on every generated method invocation

Search results