function imageapi_optimize_init in Image Optimize (or ImageAPI Optimize) 6
Same name and namespace in other branches
- 7 imageapi_optimize.module \imageapi_optimize_init()
Implements hook_init().
Abstract layer to all implemented method.
File
- ./
imageapi_optimize.module, line 13 - Image optimize functionalities
Code
function imageapi_optimize_init() {
if (!($cache = cache_get('imageapi_optimize:methods'))) {
$methods = _imageapi_optimize_get_methods();
}
else {
$methods = $cache->data;
}
foreach ($methods as $method) {
eval('function imageapi_optimize_image_' . $method . '(&$image) {
$params = array_slice(func_get_args(), 1);
return _imageapi_optimize_invoke("' . $method . '", $image, $params);
}');
}
}