[limb-svn] r6299 - 3.x/trunk/limb/imagekit/src
svn at limb-project.com
svn at limb-project.com
Fri Sep 14 14:11:24 MSD 2007
Author: cmz
Date: 2007-09-14 14:11:23 +0400 (Fri, 14 Sep 2007)
New Revision: 6299
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6299
Added:
3.x/trunk/limb/imagekit/src/lmbImageAltFactory.class.php
Log:
Added a file remotely
Added: 3.x/trunk/limb/imagekit/src/lmbImageAltFactory.class.php
===================================================================
--- 3.x/trunk/limb/imagekit/src/lmbImageAltFactory.class.php (rev 0)
+++ 3.x/trunk/limb/imagekit/src/lmbImageAltFactory.class.php 2007-09-14 10:11:23 UTC (rev 6299)
@@ -0,0 +1,42 @@
+<?php
+/*
+ * Limb PHP Framework
+ *
+ * @link http://limb-project.com
+ * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ */
+
+/**
+ * @package imagekit
+ * @version $Id$
+ */
+class lmbImageAltFactory
+{
+
+ static function create($library = 'gd', $dir = '')
+ {
+ if(defined('LIMB_IMAGE_LIBRARY'))
+ $library = LIMB_IMAGE_LIBRARY;
+
+ $image_class_name = 'lmb' . ucfirst($library) . 'ImageConvertor';
+
+ $class_path = dirname(__FILE__) . '/'. $library . '/' . $image_class_name . '.class.php';
+
+ if(!file_exists($class_path))
+ throw new lmbFileNotFoundException($class_path, 'image library not found');
+
+ lmb_require($class_path);
+
+ return new $image_class_name();
+ }
+
+ static function load($file_name, $type = '', $library = 'gd', $dir = '')
+ {
+ $convertor = self::create($library, $dir);
+ $convertor->load($file_name, $type);
+ return $convertor;
+ }
+
+}
+?>
\ No newline at end of file
More information about the limb-svn
mailing list