function create_validation_controller() { $this->_validation_controller = InputValidation::make_validation_factory('product'); }
protected function move_rename_file($file) { $mime = InputValidation::get_mime_type($file['tmp_name']); $ext = explode('/', $mime)[1]; $new_name = uniqid(); if (move_uploaded_file($file['tmp_name'], $this->logo_file_loc . $new_name . '.' . $ext)) { return ['absolute' => $this->logo_file_loc . $new_name . '.' . $ext, 'file_name' => $new_name . '.' . $ext, 'ext' => $ext]; } return false; }