Re: Upload class
| From: | Hans Westerbeek | Date: | Tue, 03 Jul 2001 09:44:56 +0000 |
| Subject: | Re: Upload class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-539@lists.php.net to get a copy of this message | ||
Hi,
I think it's better to have your class return defined error codes as opposed to error strings. It is best to leave it to the user to print the error messages accordingly.
But you have in your TODO that you want to use PEAR_Error so I suppose that sort of eliminates this problem.
Furthermore, maybe you shouldn't have specific Image methods in a File Uploading class. For that maybe it would be better to extend your class (File_Upload is prolly a good pear-name) with a new class Image_Upload and put the specific Image methods in there. You see, this leaves open the possibility to write Mp3_Upload (that would extend File_Upload as well) that will then be equipped with methods to determine the ID3 tag.
If you leave the image methods in the File_Upload class, a class like Mp3_Upload would have those methods as well, which are then ofcourse inapropriate.
I'd gladly help you developing these classes.
Regards,
Hans