Update code comments: remove old class names
authorgggeek <giunta.gaetano@gmail.com>
Sun, 29 Mar 2015 13:39:11 +0000 (14:39 +0100)
committergggeek <giunta.gaetano@gmail.com>
Sun, 29 Mar 2015 13:39:11 +0000 (14:39 +0100)
src/Client.php
src/Encoder.php
src/Helper/Charset.php
src/Helper/XMLParser.php
src/Request.php
src/Response.php
src/Server.php
src/Value.php
src/Wrapper.php

index 4331c4c..5fe3f02 100644 (file)
@@ -892,7 +892,7 @@ class Client
 
     /**
      * 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)
index e192d6b..8c63958 100644 (file)
@@ -7,7 +7,7 @@ use PhpXmlRpc\Helper\XMLParser;
 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.
      *
@@ -53,7 +53,7 @@ class Encoder
                 }
                 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)) {
@@ -82,7 +82,7 @@ class Encoder
                 $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)
@@ -114,7 +114,7 @@ class Encoder
 
     /**
      * 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)
@@ -125,7 +125,7 @@ class Encoder
      *
      * @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
@@ -188,7 +188,7 @@ class Encoder
                     }
                     $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);
                     }
index b23b5c5..cbf00a9 100644 (file)
@@ -118,7 +118,7 @@ class Charset
             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++) {
index 734ada7..b26cc18 100644 (file)
@@ -18,8 +18,8 @@ class XMLParser
     //   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
index 17aae84..4009a13 100644 (file)
@@ -100,7 +100,7 @@ class Request
      */
     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;
 
index 626fd64..90980ac 100644 (file)
@@ -18,13 +18,13 @@ class Response
     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 = '')
@@ -76,7 +76,7 @@ class Response
     /**
      * 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()
     {
index 3a8f558..ccf6c8c 100644 (file)
@@ -288,7 +288,7 @@ class Server
     /**
      * 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
@@ -514,7 +514,7 @@ class Server
             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) {
@@ -788,7 +788,7 @@ class Server
 
     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();
@@ -825,7 +825,7 @@ class Server
 
     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();
index b9d34fe..1ea6b9e 100644 (file)
@@ -37,6 +37,8 @@ class Value
     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
      */
@@ -94,7 +96,7 @@ class Value
     }
 
     /**
-     * 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
@@ -149,13 +151,13 @@ class Value
     }
 
     /**
-     * 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)
     {
@@ -177,7 +179,7 @@ class Value
     }
 
     /**
-     * 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
      *
@@ -281,7 +283,7 @@ class Value
                         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;
@@ -326,7 +328,7 @@ class Value
      */
     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);
@@ -338,7 +340,7 @@ class Value
 
     /**
      * 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
      *
@@ -350,7 +352,7 @@ class Value
     }
 
     /**
-     * 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
@@ -363,7 +365,7 @@ class Value
     }
 
     /**
-     * Reset internal pointer for xmlrpcvals of type struct.
+     * Reset internal pointer for xmlrpc values of type struct.
      */
     public function structreset()
     {
@@ -371,9 +373,9 @@ class Value
     }
 
     /**
-     * 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()
     {
@@ -381,7 +383,7 @@ class Value
     }
 
     /**
-     * Returns the value of a scalar xmlrpcval.
+     * Returns the value of a scalar xmlrpc value.
      *
      * @return mixed
      */
@@ -394,7 +396,7 @@ class Value
     }
 
     /**
-     * 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
@@ -411,7 +413,7 @@ class Value
     }
 
     /**
-     * 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)
      *
@@ -423,7 +425,7 @@ class Value
     }
 
     /**
-     * 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
      */
@@ -433,7 +435,7 @@ class Value
     }
 
     /**
-     * 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
      */
index c182c7f..fa32781 100644 (file)
@@ -96,7 +96,7 @@ class Wrapper
 
     /**
      * 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,
@@ -417,7 +417,7 @@ class Wrapper
 
     /**
      * 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
@@ -749,7 +749,7 @@ class Wrapper
             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) {