original_string: public function setFileclass($mimetype)
      {
          switch ($mimetype) {
              case 'directory':
                  $fileclass = "dir";
                  $this->is_dir = true;
                  break;
              case 'application/pdf':
                  $fileclass = "pdf";
                  break;
              case 'application/zip':
              case 'application/x-gzip':
              case 'application/x-bzip2':
              case 'application/x-zip':
              case 'application/x-rar':
              case 'application/x-tar':
                  $fileclass = "zip";
                  break;
              case 'video/mp4':
              case 'video/ogg':
              case 'video/mpeg':
              case 'application/ogg':
                  $fileclass = "video";
                  $this->is_video = true;
                  break;
              case 'audio/ogg':
              case 'audio/mpeg':
                  $fileclass = "audio";
                  $this->is_audio = true;
                  break;
              case 'image/jpeg':
              case 'image/jpg':
              case 'image/gif':
              case 'image/png':
                  $fileclass = "image";
                  $this->is_image = true;
                  break;
              case 'image/svg+xml':
                  $fileclass = "svg";
                  $this->is_image = true;
                  break;
              case 'text/x-shellscript':
                  $fileclass = 'shellscript';
                  break;
              case 'text/html':
              case 'text/javascript':
              case 'text/css':
              case 'text/xml':
              case 'application/javascript':
              case 'application/xml':
                  $fileclass = "code";
                  break;
              case 'text/x-php':
                  $fileclass = "php";
                  break;
              case 'application/x-shockwave-flash':
                  $fileclass = 'swf';
                  break;
              default:
                  $fileclass = "default";
                  break;
          }
          $this->fileclass = $fileclass;
      }
code: public function setFileclass($mimetype)
      {
          switch ($mimetype) {
              case 'directory':
                  $fileclass = "dir";
                  $this->is_dir = true;
                  break;
              case 'application/pdf':
                  $fileclass = "pdf";
                  break;
              case 'application/zip':
              case 'application/x-gzip':
              case 'application/x-bzip2':
              case 'application/x-zip':
              case 'application/x-rar':
              case 'application/x-tar':
                  $fileclass = "zip";
                  break;
              case 'video/mp4':
              case 'video/ogg':
              case 'video/mpeg':
              case 'application/ogg':
                  $fileclass = "video";
                  $this->is_video = true;
                  break;
              case 'audio/ogg':
              case 'audio/mpeg':
                  $fileclass = "audio";
                  $this->is_audio = true;
                  break;
              case 'image/jpeg':
              case 'image/jpg':
              case 'image/gif':
              case 'image/png':
                  $fileclass = "image";
                  $this->is_image = true;
                  break;
              case 'image/svg+xml':
                  $fileclass = "svg";
                  $this->is_image = true;
                  break;
              case 'text/x-shellscript':
                  $fileclass = 'shellscript';
                  break;
              case 'text/html':
              case 'text/javascript':
              case 'text/css':
              case 'text/xml':
              case 'application/javascript':
              case 'application/xml':
                  $fileclass = "code";
                  break;
              case 'text/x-php':
                  $fileclass = "php";
                  break;
              case 'application/x-shockwave-flash':
                  $fileclass = 'swf';
                  break;
              default:
                  $fileclass = "default";
                  break;
          }
          $this->fileclass = $fileclass;
      }
code_tokens: public function setFileclass ( $ mimetype ) { switch ( $ mimetype ) { case 'directory' : $ fileclass = "dir" ; $ this -> is_dir = true ; break ; case 'application/pdf' : $ fileclass = "pdf" ; break ; case 'application/zip' : case 'application/x-gzip' : case 'application/x-bzip2' : case 'application/x-zip' : case 'application/x-rar' : case 'application/x-tar' : $ fileclass = "zip" ; break ; case 'video/mp4' : case 'video/ogg' : case 'video/mpeg' : case 'application/ogg' : $ fileclass = "video" ; $ this -> is_video = true ; break ; case 'audio/ogg' : case 'audio/mpeg' : $ fileclass = "audio" ; $ this -> is_audio = true ; break ; case 'image/jpeg' : case 'image/jpg' : case 'image/gif' : case 'image/png' : $ fileclass = "image" ; $ this -> is_image = true ; break ; case 'image/svg+xml' : $ fileclass = "svg" ; $ this -> is_image = true ; break ; case 'text/x-shellscript' : $ fileclass = 'shellscript' ; break ; case 'text/html' : case 'text/javascript' : case 'text/css' : case 'text/xml' : case 'application/javascript' : case 'application/xml' : $ fileclass = "code" ; break ; case 'text/x-php' : $ fileclass = "php" ; break ; case 'application/x-shockwave-flash' : $ fileclass = 'swf' ; break ; default : $ fileclass = "default" ; break ; } $ this -> fileclass = $ fileclass ; }
docstring: Set the file class
  
  Javascript uses the fileclass to check which actions the file should have.
  CSS uses the file class to check which icon belongs to the file.
  
  @param string $mimetype
docstring_tokens: Set the file class