You are here

function imageapi_optimize_processor_handler in Image Optimize (or ImageAPI Optimize) 7.2

Get the handler class for a given processor.

Parameters

array $processor: The processor to get the handler for.

Return value

ImageAPIOptimizeProcessorInterface An instance of a imageapi optimize handler class.

4 calls to imageapi_optimize_processor_handler()
imageapi_optimize_optimize_file in ./imageapi_optimize.module
Optimize an image through a specified pipeline.
imageapi_optimize_pipeline_form in ./imageapi_optimize.admin.inc
Form builder; Edit an image pipeline name and effects order.
imageapi_optimize_pipeline_form_add_submit in ./imageapi_optimize.admin.inc
Submit handler for adding a new image effect to an image pipeline.
imageapi_optimize_processor_form in ./imageapi_optimize.admin.inc
Form builder; Form for adding and editing image effects.

File

./imageapi_optimize.module, line 914

Code

function imageapi_optimize_processor_handler(array $processor) {
  $handler_class = $processor['handler'];

  // @TODO: If no closs is found, fallback to a 'broken' handler.
  $handler = new $handler_class($processor['data']);
  return $handler;
}