For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > April 2004 > Re: [PEAR-QA] Need feedback for XML_Parser









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PEAR-QA] Need feedback for XML_Parser
Stephan Schmidt

2004-04-15, 6:32 pm

Hi,

> Don't take this as a QA post :)
> Just things I see when I read the source ;)

Thanks for your time.

> define( 'XML_PARSER_ERROR_NO_RESOURCE', 200 );
> what's up with those spaces ?
> same thing with the other define :)

I think it's easier to read, but I changed it, as PEAR CS states it
differently.

> Does the class have to be extended from PEAR ?
> Those things that are used from the PEAR class, can't they be called
> statically ?

I cannot change this without breaking BC. I just took this over from
Stig, so most of the code is not from me...

> case 'func': could be case func: if you want :) at least has always
> worked in all my scripts

No I can't. If you ommit the quotes, PHP thinks, that the constant func
is meant. This probably does not exists so the value 'func' is assumed.
But this will raise a notice.

> IMO the >= 4.0.7 fix should be removed, since PEAR needs 4.2 and the
> class is extended from PEAR :)

I thought about this, too. But I wanted to wait on feedback. I'll remove
this before the next release.

> line 265 foreach ($this->handler as $xml_func => $method) isn't this
> missing {} ;)

Thanks, seems I missed this one.

> function reset ... the if there if( <- needs the little space ;) CS
> "issue"

Consider this fixed.

Stephan
Greg Beaver

2004-04-15, 7:32 pm

Stephan Schmidt wrote:

>
> I thought about this, too. But I wanted to wait on feedback. I'll remove
> this before the next release.


Just put in a dep in package.xml on PHP > 4.2, problem solved. Users of
PHP 4.1.0 have a working XML_Parser, pretty much, and they can always
backport the fixes or upgrade.

Greg
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com