blob: 754344bbd17cce7c8861f71a285b10e914c377d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
<?php
/**
* Application component to load SimpleImage instance.
* The original component was developed by Khanh Nam.
* @link http://www.yiiframework.com/extension/simpleimage/
* @author tzur
*
*/
class CSimpleImage extends CApplicationComponent{
/**
* Initializes the SimpleImage component.
* Imports the SimpleImage class to be used by this component.
* @see CApplicationComponent::init()
*/
public function init() {
parent::init();
$dir = dirname(__FILE__);
$alias = md5($dir);
Yii::setPathOfAlias($alias, $dir);
Yii::import($alias.'.SimpleImage');
}
/**
* Loads the image and creates a SimpleImage instance.
* @param string $filename
* @return SimpleImage
*/
public function load($filename){
return new SimpleImage($filename);
}
}
?>
|