/**
* Attempt to boxcar $msgs via system.multicall.
- * Returns either an array of xmlrpcreponses, an xmlrpc error response
+ * Returns either an array of xmlrpc reponses, an xmlrpc error response
* or false (when received response does not respect valid multicall syntax).
*/
private function _try_multicall($msgs, $timeout, $method)
class Encoder
{
/**
- * Takes an xmlrpc value in PHP xmlrpcval object format and translates it into native PHP types.
+ * Takes an xmlrpc value in object format and translates it into native PHP types.
*
* Works with xmlrpc requests objects as input, too.
*
}
if (in_array('dates_as_objects', $options) && $xmlrpc_val->scalartyp() == 'dateTime.iso8601') {
// we return a Datetime object instead of a string
- // since now the constructor of xmlrpcval accepts safely strings, ints and datetimes,
+ // since now the constructor of xmlrpc value accepts safely strings, ints and datetimes,
// we cater to all 3 cases here
$out = $xmlrpc_val->scalarval();
if (is_string($out)) {
$xmlrpc_val->structreset();
// If user said so, try to rebuild php objects for specific struct vals.
/// @todo should we raise a warning for class not found?
- // shall we check for proper subclass of xmlrpcval instead of
+ // shall we check for proper subclass of xmlrpc value instead of
// presence of _php_class to detect what we can do?
if (in_array('decode_php_objs', $options) && $xmlrpc_val->_php_class != ''
&& class_exists($xmlrpc_val->_php_class)
/**
* Takes native php types and encodes them into xmlrpc PHP object format.
- * It will not re-encode xmlrpcval objects.
+ * It will not re-encode xmlrpc value objects.
*
* Feature creep -- could support more types via optional type argument
* (string => datetime support has been added, ??? => base64 not yet)
*
* @author Dan Libby (dan@libby.com)
*
- * @param mixed $php_val the value to be converted into an xmlrpcval object
+ * @param mixed $php_val the value to be converted into an xmlrpc value object
* @param array $options can include 'encode_php_objs', 'auto_dates', 'null_extension' or 'extension_api'
*
* @return \PhpXmlrpc\Value
}
$xmlrpc_val = new Value($arr, Value::$xmlrpcStruct);
if (in_array('encode_php_objs', $options)) {
- // let's save original class name into xmlrpcval:
+ // let's save original class name into xmlrpc value:
// might be useful later on...
$xmlrpc_val->_php_class = get_class($php_val);
}
case 'UTF-8_ISO-8859-1':
// NB: this will choke on invalid UTF-8, going most likely beyond EOF
$escaped_data = '';
- // be kind to users creating string xmlrpcvals out of different php types
+ // be kind to users creating string xmlrpc values out of different php types
$data = (string)$data;
$ns = strlen($data);
for ($nn = 0; $nn < $ns; $nn++) {
// valuestack - array used for parsing arrays and structs
// lv - used to indicate "looking for a value": implements
// the logic to allow values with no types to be strings
- // isf - used to indicate a parsing fault (2) or xmlrpcresp fault (1)
- // isf_reason - used for storing xmlrpcresp fault string
+ // isf - used to indicate a parsing fault (2) or xmlrpc response fault (1)
+ // isf_reason - used for storing xmlrpc response fault string
// method - used to store method name
// params - used to store parameters in method calls
// pt - used to store the type of each received parameter. Useful if parameters are automatically decoded to php values
*/
public function addParam($param)
{
- // add check: do not add to self params which are not xmlrpcvals
+ // add check: do not add to self params which are not xmlrpc values
if (is_object($param) && is_a($param, 'PhpXmlRpc\Value')) {
$this->params[] = $param;
public $raw_data = '';
/**
- * @param mixed $val either an xmlrpcval obj, a php value or the xml serialization of an xmlrpcval (a string)
+ * @param mixed $val either an xmlrpc value obj, a php value or the xml serialization of an xmlrpc value (a string)
* @param integer $fCode set it to anything but 0 to create an error response
* @param string $fString the error string, in case of an error response
* @param string $valType either 'xmlrpcvals', 'phpvals' or 'xml'
*
* @todo add check that $val / $fCode / $fString is of correct type???
- * NB: as of now we do not do it, since it might be either an xmlrpcval or a plain
+ * NB: as of now we do not do it, since it might be either an xmlrpc value or a plain
* php val, or a complete xml chunk, depending on usage of Client::send() inside which creator is called...
*/
public function __construct($val, $fCode = 0, $fString = '', $valType = '')
/**
* Returns the value received by the server.
*
- * @return mixed the xmlrpcval object returned by the server. Might be an xml string or php value if the response has been created by specially configured Client objects
+ * @return mixed the xmlrpc value object returned by the server. Might be an xml string or php value if the response has been created by specially configured Client objects
*/
public function value()
{
/**
* Verify type and number of parameters received against a list of known signatures.
*
- * @param array $in array of either xmlrpcval objects or xmlrpc type definitions
+ * @param array $in array of either xmlrpc value objects or xmlrpc type definitions
* @param array $sig array of known signatures to match against
*
* @return array
xml_parser_free($parser);
// small layering violation in favor of speed and memory usage:
// we should allow the 'execute' method handle this, but in the
- // most common scenario (xmlrpcvals type server with some methods
+ // most common scenario (xmlrpc values type server with some methods
// registered as phpvals) that would mean a useless encode+decode pass
if ($this->functions_parameters_type != 'xmlrpcvals' || (isset($this->dmap[$xmlRpcParser->_xh['method']]['parameters_type']) && ($this->dmap[$xmlRpcParser->_xh['method']]['parameters_type'] == 'phpvals'))) {
if ($this->debug > 1) {
public static function _xmlrpcs_methodSignature($server, $m)
{
- // let accept as parameter both an xmlrpcval or string
+ // let accept as parameter both an xmlrpc value or string
if (is_object($m)) {
$methName = $m->getParam(0);
$methName = $methName->scalarval();
public static function _xmlrpcs_methodHelp($server, $m)
{
- // let accept as parameter both an xmlrpcval or string
+ // let accept as parameter both an xmlrpc value or string
if (is_object($m)) {
$methName = $m->getParam(0);
$methName = $methName->scalarval();
public $_php_class = null;
/**
+ * Build an xmlrpc value
+ *
* @param mixed $val
* @param string $type any valid xmlrpc type name (lowercase). If null, 'string' is assumed
*/
}
/**
- * Add a single php value to an (unitialized) xmlrpcval.
+ * Add a single php value to an (unitialized) xmlrpc value.
*
* @param mixed $val
* @param string $type
}
/**
- * Add an array of xmlrpcval objects to an xmlrpcval.
+ * Add an array of xmlrpc values objects to an xmlrpc value.
*
* @param Value[] $vals
*
* @return int 1 or 0 on failure
*
- * @todo add some checking for $vals to be an array of xmlrpcvals?
+ * @todo add some checking for $vals to be an array of xmlrpc values?
*/
public function addArray($vals)
{
}
/**
- * Add an array of named xmlrpcval objects to an xmlrpcval.
+ * Add an array of named xmlrpc value objects to an xmlrpc value.
*
* @param Value[] $vals
*
break;
default:
// no standard type value should arrive here, but provide a possibility
- // for xmlrpcvals of unknown type...
+ // for xmlrpc values of unknown type...
$rs .= "<${typ}>${val}</${typ}>";
}
break;
*/
public function serialize($charset_encoding = '')
{
- // add check? slower, but helps to avoid recursion in serializing broken xmlrpcvals...
+ // add check? slower, but helps to avoid recursion in serializing broken xmlrpc values...
//if (is_object($o) && (get_class($o) == 'xmlrpcval' || is_subclass_of($o, 'xmlrpcval')))
//{
reset($this->me);
/**
* Checks whether a struct member with a given name is present.
- * Works only on xmlrpcvals of type struct.
+ * Works only on xmlrpc values of type struct.
*
* @param string $m the name of the struct member to be looked up
*
}
/**
- * Returns the value of a given struct member (an xmlrpcval object in itself).
+ * Returns the value of a given struct member (an xmlrpc value object in itself).
* Will raise a php warning if struct member of given name does not exist.
*
* @param string $m the name of the struct member to be looked up
}
/**
- * Reset internal pointer for xmlrpcvals of type struct.
+ * Reset internal pointer for xmlrpc values of type struct.
*/
public function structreset()
{
}
/**
- * Return next member element for xmlrpcvals of type struct.
+ * Return next member element for xmlrpc values of type struct.
*
- * @return xmlrpcval
+ * @return Value
*/
public function structeach()
{
}
/**
- * Returns the value of a scalar xmlrpcval.
+ * Returns the value of a scalar xmlrpc value.
*
* @return mixed
*/
}
/**
- * Returns the type of the xmlrpcval.
+ * Returns the type of the xmlrpc value.
* For integers, 'int' is always returned in place of 'i4'.
*
* @return string
}
/**
- * Returns the m-th member of an xmlrpcval of struct type.
+ * Returns the m-th member of an xmlrpc value of struct type.
*
* @param integer $m the index of the value to be retrieved (zero based)
*
}
/**
- * Returns the number of members in an xmlrpcval of array type.
+ * Returns the number of members in an xmlrpc value of array type.
*
* @return integer
*/
}
/**
- * Returns the number of members in an xmlrpcval of struct type.
+ * Returns the number of members in an xmlrpc value of struct type.
*
* @return integer
*/
/**
* Given a user-defined PHP function, create a PHP 'wrapper' function that can
- * be exposed as xmlrpc method from an xmlrpc_server object and called from remote
+ * be exposed as xmlrpc method from an xmlrpc server object and called from remote
* clients (as well as its corresponding signature info).
*
* Since php is a typeless language, to infer types of input and output parameters,
/**
* Given a user-defined PHP class or php object, map its methods onto a list of
- * PHP 'wrapper' functions that can be exposed as xmlrpc methods from an xmlrpc_server
+ * PHP 'wrapper' functions that can be exposed as xmlrpc methods from an xmlrpc server
* object and called from remote clients (as well as their corresponding signature info).
*
* @param mixed $classname the name of the class whose methods are to be exposed as xmlrpc methods, or an object instance of that class
if ($ptype == 'i4' || $ptype == 'int' || $ptype == 'boolean' || $ptype == 'double' ||
$ptype == 'string' || $ptype == 'dateTime.iso8601' || $ptype == 'base64' || $ptype == 'null'
) {
- // only build directly xmlrpcvals when type is known and scalar
+ // only build directly xmlrpc values when type is known and scalar
$innercode .= "\$p$i = new {$namespace}Value(\$p$i, '$ptype');\n";
} else {
if ($encode_php_objects) {