| @@ 2833-2852 (lines=20) @@ | ||
| 2830 | * |
|
| 2831 | * @todo add some checking for $vals to be an array of xmlrpcvals? |
|
| 2832 | */ |
|
| 2833 | function addArray($vals) |
|
| 2834 | { |
|
| 2835 | if($this->mytype==0) |
|
| 2836 | { |
|
| 2837 | $this->mytype=$GLOBALS['xmlrpcTypes']['array']; |
|
| 2838 | $this->me['array']=$vals; |
|
| 2839 | return 1; |
|
| 2840 | } |
|
| 2841 | elseif($this->mytype==2) |
|
| 2842 | { |
|
| 2843 | // we're adding to an array here |
|
| 2844 | $this->me['array'] = array_merge($this->me['array'], $vals); |
|
| 2845 | return 1; |
|
| 2846 | } |
|
| 2847 | else |
|
| 2848 | { |
|
| 2849 | error_log('XML-RPC: '.__METHOD__.': already initialized as a [' . $this->kindOf() . ']'); |
|
| 2850 | return 0; |
|
| 2851 | } |
|
| 2852 | } |
|
| 2853 | ||
| 2854 | /** |
|
| 2855 | * Add an array of named xmlrpcval objects to an xmlrpcval |
|
| @@ 2862-2881 (lines=20) @@ | ||
| 2859 | * |
|
| 2860 | * @todo add some checking for $vals to be an array? |
|
| 2861 | */ |
|
| 2862 | function addStruct($vals) |
|
| 2863 | { |
|
| 2864 | if($this->mytype==0) |
|
| 2865 | { |
|
| 2866 | $this->mytype=$GLOBALS['xmlrpcTypes']['struct']; |
|
| 2867 | $this->me['struct']=$vals; |
|
| 2868 | return 1; |
|
| 2869 | } |
|
| 2870 | elseif($this->mytype==3) |
|
| 2871 | { |
|
| 2872 | // we're adding to a struct here |
|
| 2873 | $this->me['struct'] = array_merge($this->me['struct'], $vals); |
|
| 2874 | return 1; |
|
| 2875 | } |
|
| 2876 | else |
|
| 2877 | { |
|
| 2878 | error_log('XML-RPC: '.__METHOD__.': already initialized as a [' . $this->kindOf() . ']'); |
|
| 2879 | return 0; |
|
| 2880 | } |
|
| 2881 | } |
|
| 2882 | ||
| 2883 | // poor man's version of print_r ??? |
|
| 2884 | // DEPRECATED! |
|