Re: Re: Supporting php4 and php5 E_STRICT with the same package name
| From: | Joshua Eichorn | Date: | Mon, 10 Jul 2006 21:43:35 +0000 |
| Subject: | Re: Re: Supporting php4 and php5 E_STRICT with the same package name | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-43354@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
Joshua Eichorn wrote:And I don't think I use any static methods and if I do im sure i could get rid of there use.Well the point is not to promote bad API design :/ I use them in one place right now, and there really isn't a need for it, in fact it would be better to just call the method on an instance since you have an instance anyway.
At this point its $server = new HTML_AJAX_Server() which gives you the option of setting the servers url. I guess I could just make the user use a setter method instead, im not sure what the recommended practice for options like that is.So that leaves me with constructors on 3 classes as the problem. This whole issue just makes me hate php.Factories to the rescue ... But don't most factories use static methods.
Also are there any PEAR rules on part of a package requiring php5, im thinking about adding some XML stuff but it only makes sense in php5 and wouldn't be needed if you don't want those features.XML in PHP5 is a lot more fun than before, that is for sure. I recently moved from XML_Serializer to SimpleXML .. quite a speed difference too. Though annoyingly you cannot teall SimpleXML to not spit out XML header. At the beginning this would just be automatically detecting SimpleXML or DOM objects and automatically exposing them to JavaScript as XML instead of using the default serialization format. And also doing the same thing in the other direction. I don't think i would use it, but it would be easy to add, it just doesn't make sense much sense in php4.
regards, Lukas -josh