AW: [PEAR-DEV] Re: Proposal: XML_Util
| From: | Stephan Schmidt | Date: | Thu, 31 Jul 2003 20:56:03 +0000 |
| Subject: | AW: [PEAR-DEV] Re: Proposal: XML_Util | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-19093@lists.php.net to get a copy of this message | ||
Hi,
> @const is unnecessary, phpDocumentor parses constants without
> help, and
> will raise a warning of an unknown tag.
OK. Can I add a description above the constant?
/**
* error code for invalid chars in XML name
*/
define("XML_UTIL_ERROR_INVALID_CHARS", 51);
> > You should use @static in front of static functions, no
> arguments just:
OK, I'll change this.
> I'd like to see replaceEntities accept as an optional
> parameter an array
> so that international entities can be optionally replaced, and things
> like the copyright symbol as well, just add in an
> array_merge($entities,
> $options) and strtr($string, $options). That should resolve
> the problem
> I had with it being a static method, as it will be extensible without
> the need for sub-classing.
The entities <, >, &, ' and " are the only predefined ones in XML
documents, so there's basically no need to add other entitites, just
change the encoding.
But if it makes you happy, I'll add it as an optional parameter.
Stephan