image_toolkit_invoke
Definition
image_toolkit_invoke($method, $params = array())
includes/image.inc, line 62
Description
Invokes the given method using the currently selected toolkit.
Parameters
$method A string containing the method to invoke.
$params An optional array of parameters to pass to the toolkit method.
Return value
Mixed values (typically Boolean for successful operation).
Code
<?php
function image_toolkit_invoke($method, $params = array()) {
if ($toolkit = image_get_toolkit()) {
$function = 'image_'. $toolkit .'_'. $method;
if (function_exists($function)) {
return call_user_func_array($function, $params);
}
else {
watchdog('php', t("The selected image handling toolkit '%toolkit' can not correctly process '%function'.", array('%toolkit' => "<em>$toolkit</em>", '%function' => "<em>$function</em>")), WATCHDOG_ERROR);
return false;
}
}
else {
if ($method == 'settings') {
return image_gd_settings();
}
}
}
?> 