Setup of classes
| From: | Peter Bowyer | Date: | Wed, 20 Feb 2002 12:32:02 +0000 |
| Subject: | Setup of classes | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-4824@lists.php.net to get a copy of this message | ||
Not a very suitable title, but I don't know how else to describe it ;-)
In pear do you prefer the usage of classes to be:
require_once "ImageGD.php";
$im = new Image();
. . .
require_once "ImageIM.php";
$im = new Image();
. . .
Or do you prefer:
require_once "Image.php";
$im = new Image('GD');
. . .
?? The first way requires less overhead, but the second is neater IMO. Both ways would still requre the user to define a constant in their application to state which image library to use, so neither one's easier to use.
Thanks,
Peter.
--
Maple Design - http://www.mapledesign.co.uk