|
 Tyson Vanover - 2010-01-22 23:13:46
First up, thank you very much for this excellent class. It has saved me so much work and pain.
Second, is there a reason that the simplexml class should not be as static class? For my own work I have created a singleton funciton 'load_file' that in one command returns a SimpleXmlObject from a filename. I haven't really explored the rest of the simplexml class's methods, and as I do I hope to share with you any changes I make to meet my needs.
[code]
static function load($file, $resulttype = 'object', $encoding = 'UTF-8'){
if(!isset(self::$singleton)){
self::$singleton = new simplexml();
}
return self::$singleton->xml_load_file($file, $resulttype, $encoding);
}
[/code]
Also, since I may be using this as a component of a larger project with some modifications I would like to properly attribute the original class to you. There isn't a docblock with author, licence, version, etc. in the current version. Could you either send me one, or better yet, update the version on phpclasses with a file docblock?
Thanks, and keep up the good work.
 Taha Paksu - 2010-01-24 00:29:17 - In reply to message 1 from Tyson Vanover
First, I thank you for your interest for using my class.
Second, I thought that users who are able to use xml files with a class should decide if they would use it as a singleton class or multi instanced class. Maybe they will use two or more xml files for their needs.
Third, I didn't create a docblock for it because i didn't need it before :) so that's up to you if you want to mention me in your code or not. That's not a problem at all. But thanks for asking.
|