From: Michael J. Rubinsky Date: Mon, 25 Oct 2010 17:44:15 +0000 (-0400) Subject: Remove Horde_Image::factory X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2dac75e55f00927d8a0c462d40945187528f8cab;p=horde.git Remove Horde_Image::factory --- diff --git a/framework/Image/lib/Horde/Image.php b/framework/Image/lib/Horde/Image.php index 2cd096491..819eac5d0 100644 --- a/framework/Image/lib/Horde/Image.php +++ b/framework/Image/lib/Horde/Image.php @@ -217,42 +217,6 @@ class Horde_Image } /** - * Attempts to return a concrete Horde_Image instance based on $driver. - * - * @param mixed $driver The type of concrete Horde_Image subclass to - * return. This is based on the storage driver - * ($driver). The code is dynamically included. If - * $driver is an array, then we will look in - * $driver[0]/lib/Image/ for the subclass - * implementation named $driver[1].php. - * @param array $params A hash containing any additional configuration or - * connection parameters a subclass might need. - * - * @return mixed Horde_Image object - * @throws Horde_Image_Exception - */ - static public function factory($driver, $params = array()) - { - if (is_array($driver)) { - list($app, $driver) = $driver; - } - - $driver = basename($driver); - $class = 'Horde_Image_' . $driver; - if (!empty($params['context']) && count($params['context'])) { - $context = $params['context']; - unset($params['context']); - } else { - $context = array(); - } - if (class_exists($class)) { - return new $class($params, $context); - } else { - throw new Horde_Image_Exception('Invalid Image driver specified: ' . $class . ' not found.'); - } - } - - /** * Return point size for font */ static public function getFontSize($fontsize)