Esempio n. 1
0
 /**
  * Get allowed extension.
  *
  * @return string
  */
 protected function getAllowedExtensions()
 {
     return implode("','", PermissionUtility::getInstance()->getAllowedExtensions());
 }
Esempio n. 2
0
 /**
  * Check whether the file is allowed
  *
  * @param string $fileName
  */
 public function checkFileAllowed($fileName)
 {
     $isAllowed = $this->checkFileExtensionPermission($fileName);
     if (!$isAllowed) {
         $these = PermissionUtility::getInstance()->getAllowedExtensionList();
         $this->throwException('File has an invalid extension, it should be one of ' . $these . '.');
     }
 }