mirror of
https://github.com/flextype/flextype.git
synced 2025-08-10 23:24:04 +02:00
Flextype Core: Glide/Intervention Image Implementation #61
This commit is contained in:
@@ -27,9 +27,9 @@ class Images
|
||||
private static $instance = null;
|
||||
|
||||
/**
|
||||
* Cache Driver
|
||||
* Images Server
|
||||
*
|
||||
* @var DoctrineCache
|
||||
* @var
|
||||
*/
|
||||
protected static $server;
|
||||
|
||||
@@ -62,7 +62,7 @@ class Images
|
||||
}
|
||||
|
||||
/**
|
||||
* Init Themes
|
||||
* Init Images
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
@@ -120,11 +120,32 @@ class Images
|
||||
Images::$server = $server;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image
|
||||
*
|
||||
* Images::get('page-name/image.jpg', [w => '200']);
|
||||
*
|
||||
* @access public
|
||||
* @param string $path Image path
|
||||
* @param array $params Image params
|
||||
* @return string Returns the image url
|
||||
*/
|
||||
public static function get($path, $params)
|
||||
{
|
||||
return Http::getBaseUrl().'/site/cache/glide/'.Images::$server->makeImage($path, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns server variable
|
||||
*
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public static function server()
|
||||
{
|
||||
return Images::$server;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Image instance.
|
||||
*
|
||||
|
Reference in New Issue
Block a user