private static function _resizeThumb($arr) { $temp_file_path = $arr['img_src']; if (StringManipulator::get_last_character_in_string($temp_file_path) == '/') { $temp_file_path = substr($temp_file_path, 0, -1); } $arr['temp_file_destination'] = substr($temp_file_path, 0, strrpos($temp_file_path, '/')); $arr['temp_file_name'] = substr($temp_file_path, strrpos($temp_file_path, '/')); $arr['final_file_destination'] = $arr['uploaddir']; $arr['final_file_name'] = strtolower($arr['final_filename'] . '.' . $arr['file_extension']); //'.jpg'; echo self::_cropImg($arr); if ($arr['exit_on_end']) { exit; } $callback = $arr['on_end_callback']; $callback_path = $arr['on_end_callback_path']; if (file_exists($callback_path)) { require_once $callback_path; if (function_exists($callback)) { $callback(); } } }