improve encoding utf8->ascii for non-printable chars
[plcapi.git] / src / Value.php
index 2627e58..e3db3a1 100644 (file)
@@ -40,7 +40,10 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
     /// @todo: do these need to be public?
     /** @var Value[]|mixed */
     public $me = array();
-    /** @var int $mytype */
+    /**
+     * @var int $mytype
+     * @internal
+     */
     public $mytype = 0;
     /** @var string|null $_php_class */
     public $_php_class = null;
@@ -50,7 +53,7 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
      *
      * When no value or type is passed in, the value is left uninitialized, and the value can be added later.
      *
-     * @param mixed $val if passing in an array, all array elements should be PhpXmlRpc\Value themselves
+     * @param Value[]|mixed $val if passing in an array, all array elements should be PhpXmlRpc\Value themselves
      * @param string $type any valid xmlrpc type name (lowercase): i4, int, boolean, string, double, dateTime.iso8601,
      *                     base64, array, struct, null.
      *                     If null, 'string' is assumed.
@@ -229,6 +232,12 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
         }
     }
 
+    /**
+     * @param string typ
+     * @param Value[]|mixed $val
+     * @param string $charsetEncoding
+     * @return string
+     */
     protected function serializedata($typ, $val, $charsetEncoding = '')
     {
         $rs = '';
@@ -498,6 +507,7 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
      * Implements the IteratorAggregate interface
      *
      * @return \ArrayIterator
+     * @internal required to be public to implement an Interface
      */
     public function getIterator()
     {
@@ -513,6 +523,12 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
         }
     }
 
+    /**
+     * @internal required to be public to implement an Interface
+     * @param mixed $offset
+     * @param mixed $value
+     * @throws \Exception
+     */
     public function offsetSet($offset, $value)
     {
         switch ($this->mytype) {
@@ -553,6 +569,11 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
         }
     }
 
+    /**
+     * @internal required to be public to implement an Interface
+     * @param mixed $offset
+     * @return bool
+     */
     public function offsetExists($offset)
     {
         switch ($this->mytype) {
@@ -568,6 +589,11 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
         }
     }
 
+    /**
+     * @internal required to be public to implement an Interface
+     * @param mixed $offset
+     * @throws \Exception
+     */
     public function offsetUnset($offset)
     {
         switch ($this->mytype) {
@@ -585,6 +611,12 @@ class Value implements \Countable, \IteratorAggregate, \ArrayAccess
         }
     }
 
+    /**
+     * @internal required to be public to implement an Interface
+     * @param mixed $offset
+     * @return mixed|Value|null
+     * @throws \Exception
+     */
     public function offsetGet($offset)
     {
         switch ($this->mytype) {