X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2FValue.php;h=0f39a67203b589b13f8cece5bed9be1f1ba7e713;hb=a566be29a44b1bb08941e81ff1f97eaf4ae10963;hp=e47e954b9a87b4024244db4fd0e73d930c4a08eb;hpb=3f49519b2d8157ac9da42bcf5836bf94020de485;p=plcapi.git diff --git a/src/Value.php b/src/Value.php index e47e954..0f39a67 100644 --- a/src/Value.php +++ b/src/Value.php @@ -229,7 +229,7 @@ class Value } } - private function serializedata($typ, $val, $charset_encoding = '') + protected function serializedata($typ, $val, $charset_encoding = '') { $rs = ''; @@ -339,20 +339,6 @@ class Value //} } - // DEPRECATED - public function serializeval($o) - { - // add check? slower, but helps to avoid recursion in serializing broken xmlrpcvals... - //if (is_object($o) && (get_class($o) == 'xmlrpcval' || is_subclass_of($o, 'xmlrpcval'))) - //{ - $ar = $o->me; - reset($ar); - list($typ, $val) = each($ar); - - return '' . $this->serializedata($typ, $val) . "\n"; - //} - } - /** * Checks whether a struct member with a given name is present. * Works only on xmlrpcvals of type struct. @@ -397,41 +383,6 @@ class Value return each($this->me['struct']); } - // DEPRECATED! this code looks like it is very fragile and has not been fixed - // for a long long time. Shall we remove it for 2.0? - public function getval() - { - // UNSTABLE - reset($this->me); - list($a, $b) = each($this->me); - // contributed by I Sofer, 2001-03-24 - // add support for nested arrays to scalarval - // i've created a new method here, so as to - // preserve back compatibility - - if (is_array($b)) { - @reset($b); - while (list($id, $cont) = @each($b)) { - $b[$id] = $cont->scalarval(); - } - } - - // add support for structures directly encoding php objects - if (is_object($b)) { - $t = get_object_vars($b); - @reset($t); - while (list($id, $cont) = @each($t)) { - $t[$id] = $cont->scalarval(); - } - @reset($t); - while (list($id, $cont) = @each($t)) { - @$b->$id = $cont; - } - } - // end contrib - return $b; - } - /** * Returns the value of a scalar xmlrpcval. *