Remove Horde_Image::factory
authorMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 25 Oct 2010 17:44:15 +0000 (13:44 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Mon, 25 Oct 2010 17:44:15 +0000 (13:44 -0400)
framework/Image/lib/Horde/Image.php

index 2cd0964..819eac5 100644 (file)
@@ -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)