Re: [PEPr] +1 for File Formats::File_XSPF

From: Date: Thu, 08 Dec 2005 13:13:15 +0000
Subject: Re: [PEPr] +1 for File Formats::File_XSPF
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-40645@lists.php.net to get a copy of this message
Hi Hannes, Hannes Magnusson wrote: >> The CS issues should be fixed, but if you can provide further specific >> instances I'd be keen to fix them too. > http://pear.php.net/manual/en/standards.funcdef.php and > http://pear.php.net/manual/en/standards.including.php > "Note: include_once and require_once are statements, not functions. > Parentheses should not surround the subject filename." Great, not a problem. > return is a language construct, not a function, so the same rules should apply. > http://php.net/return > "...the parentheses surrounding its arguments are only required if the > argument contains an expression" > > In XSPF.php you've return (''), return ($this->_annotation), return > ($this->_attributions)...... Damn it, I was sure that was part of the standards. Guess I must be getting mixed up with other standards! Again, I can't see this being a problem. >> I wrote the package in PHP4 because that is what I still write the >> majority of my code in, and is currently still more in use than PHP5. >> That said, I think writing a version of the package in strict PHP5 would >> bring the benefits you describe, and if there was the facility to have >> the PHP5 code co-exist, I would release one. > Good to hear. Not sure how the best way to have PHP4 and PHP5 versions > of the same package coexists... Greg Beaver was proposing something about adding tags to packages, so perhaps when that concept is introduced I can release both side-by-side. >> As for the concatenation, I can pass off the XML generation to something >> like XML_FastCreate. Would that satisfy your conditions? > I guess, but Id rather want you to use DOM-XML (don't remember if > there exists any better solution for PHP4). I'd rather not use a PHP extension to do such things because it might not be available, and having that sort of dependency is a pain for users lacking root or administrator access to their server. I guess I could use 'extension_loaded' and fall back to XML_FastCreate, or the string concatenating. Comments? Cheers, David -- David Grant http://www.grant.org.uk/

« previous php.pear.dev (#40645) next »