Re: Re: [PEPr] -1 for XML::XML_RPC2
| From: | Sergio Carvalho | Date: | Tue, 17 May 2005 11:13:36 +0000 |
| Subject: | Re: Re: [PEPr] -1 for XML::XML_RPC2 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37694@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
> This jumps out an shouts 'factory method here'...
>
> 'binarydata' => XML_RPC2::valueFactory('base64',$data);
>
> you can have all your class's representing the objects, and dont have to
> bother the user generally with their details..
>
> Regards
> alan
True, true. In hindsight it's perfectly obvious: A Factory method allows
for the classes to be used to define the types, but the underlying
implementation to be procedural (as is the case with the xmlrpc
extensions and their setType function). I'd implement this with a
factory method per class:
XML_RPC2_Value_Base64::create
but won't mind providing a shortcut method in XML_RPC2_Value (there's no
XML_RPC2 base class).
I'll summarize (once again) changes to XML_RPC2, after I get to analyze
the profiling data in the basis of Greg's yesterday post. If I'm not
forced to go with the setType solution, I'll change the API.
Cheers,
--
Sérgio Carvalho
AIM: SergioSGC / ICQ: 67512780