public function imageResize($value) { $resize = new ImageFile($value['tmp_name']); if (isset($this->options['params']['type'])) { switch ($this->options['params']['type']) { case 'getCenter': $resize->centerResize($this->options['params']['save_path'] . $this->options['params']['prefix'] . $value['name'], $this->options['params']['width'], $this->options['params']['height']); break; } } return $value; }