protected function callFunction($prefix, $format, array $arguments)
    {
        $function = "$prefix$format";

        if (!in_array($format, $this->getSupportedFormats())) {
            throw new RuntimeException("Unsupported image format $format");
        }

        if (!function_exists($function)) {
            throw new BadFunctionCallException("Function $function does not exist");
        }

        return call_user_func_array($function, $arguments);
    }
protected function callFunction($prefix, $format, array $arguments)
    {
        $function = "$prefix$format";

        if (!in_array($format, $this->getSupportedFormats())) {
            throw new RuntimeException("Unsupported image format $format");
        }

        if (!function_exists($function)) {
            throw new BadFunctionCallException("Function $function does not exist");
        }

        return call_user_func_array($function, $arguments);
    }
protected function callFunction ( $ prefix , $ format , array $ arguments ) { $ function = "$prefix$format" ; if ( ! in_array ( $ format , $ this -> getSupportedFormats ( ) ) ) { throw new RuntimeException ( "Unsupported image format $format" ) ; } if ( ! function_exists ( $ function ) ) { throw new BadFunctionCallException ( "Function $function does not exist" ) ; } return call_user_func_array ( $ function , $ arguments ) ; }
Call a function which name is constructed from prefix and image format
@param string $prefix
@param string $format
@param array $arguments
@return mixed
@throws RuntimeException
@throws BadFunctionCallException
Call a function which name is constructed from prefix and image format