Re: AW: [PEAR-DEV] Re: [RfC] XML_Serializer
| From: | Bertrand Mansion | Date: | Wed, 30 Jul 2003 17:14:34 +0000 |
| Subject: | Re: AW: [PEAR-DEV] Re: [RfC] XML_Serializer | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-18964@lists.php.net to get a copy of this message | ||
<schst@php-tools.net> wrote :
> Hi,
>
>> Why do you think you can't extend a class with static
>> methods? I think this class is a perfect example of when it
>> makes sense to use static class methods.
>
> That's exactly what I thought. The methods will always return the same
> output when supplying the same input. There's no way to change their
> behaviour with object properties => Let's call them statically.
>
> The main problem will be the naming of the class:
>
> a) XML_Util
> b) XML
> c) XML_Common
>
> I'd prefer XML or XML_Util. Furthermore we have to discuss the methods
> that should be implmented. I can think of:
>
> string attributesToString(array attributes)
> string replaceEntities(string string)
> string getXMLDeclaration(float version, string encoding, boolean
> standalone)
> boolean validateTagName( string tagname )
> boolean validateAttributeName(string attributename)
>
> maybe even methods to buid opening and closing tags...
The Config package can already convert a PHP array to XML and back.
Could you please summarize for me what new features your package brings.
It might be worth having a look at Config and let me know what you think,
and if Config could use your serializer in the future...
Thanks,
Bertrand Mansion
Mamasam