image_toolkit_invoke

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

includes/image.inc, строка 53

Версии
5 – 6
image_toolkit_invoke($method, $params = array())

Invokes the given method using the currently selected toolkit.

Параметры

$method A string containing the method to invoke.

$params An optional array of parameters to pass to the toolkit method.

Возвращаемое значение

Mixed values (typically Boolean for successful operation).

▾ 5 функции вызывают image_toolkit_invoke()

image_crop in includes/image.inc
Crop an image to the rectangle specified by the given rectangle.
image_resize in includes/image.inc
Resize an image to the given dimensions (ignoring aspect ratio).
image_rotate in includes/image.inc
Rotate an image by the given number of degrees.
image_scale in includes/image.inc
Scales an image to the given width and height while maintaining aspect ratio.
system_image_toolkit_settings in modules/system/system.module

Код

<?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' => $toolkit, '%function' => $function)), WATCHDOG_ERROR);
      return FALSE;
    }
  }
  else {
    if ($method == 'settings') {
      return image_gd_settings();
    }
  }
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему