Ejemplo n.º 1
0
 function create_validation_controller()
 {
     $this->_validation_controller = InputValidation::make_validation_factory('product');
 }
Ejemplo n.º 2
0
 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;
 }