/** * Get allowed extension. * * @return string */ protected function getAllowedExtensions() { return implode("','", PermissionUtility::getInstance()->getAllowedExtensions()); }
/** * 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 . '.'); } }