<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Res\Type; use ModStart\Core\Type\BaseType; class ResAssetFileExt implements BaseType { const PDF = 'pdf'; const DOC = 'doc'; const DOCX = 'docx'; const PPT = 'ppt'; const PPTX = 'pptx'; const TXT = 'txt'; const XLSX = 'xlsx'; const XLS = 'xls'; const CSV = 'csv'; const AI = 'ai'; const PSD = 'psd'; const PNG = 'png'; const JPG = 'jpg'; const JPEG = 'jpeg'; const ZIP = 'zip'; const EPUB = 'epub'; const MP3 = 'mp3'; const MP4 = 'mp4'; public static function getList() { return array(self::PDF => 'PDF', self::DOC => 'DOC', self::DOCX => 'DOCX', self::PPT => 'PPT', self::PPTX => 'PPTX', self::TXT => 'TXT', self::XLSX => 'XLSX', self::XLS => 'XLS', self::CSV => 'CSV', self::AI => 'AI', self::PSD => 'PSD', self::PNG => 'PNG', self::JPG => 'JPG', self::JPEG => 'JPEG', self::ZIP => 'ZIP', self::EPUB => 'EPUB', self::MP3 => 'MP3', self::MP4 => 'MP4'); } public static function enabled() { goto UB3EM; T_5aQ: foreach (self::getList() as $kEhTf => $y2Ltn) { if (in_array($kEhTf, $sB5xH)) { $PcqTW[$kEhTf] = $y2Ltn; } } goto BU43P; vyOQX: $sB5xH = modstart_config()->getArray('Res_AssetFileExts', array()); goto T_5aQ; UB3EM: $PcqTW = array(); goto vyOQX; BU43P: return $PcqTW; goto gojR5; gojR5: } public static function filter($Ub4by) { goto xW69F; vZdCQ: return $PcqTW; goto Zmmgz; dCAQ4: foreach (self::getList() as $kEhTf => $y2Ltn) { if (in_array($kEhTf, $Ub4by)) { $PcqTW[$kEhTf] = $y2Ltn; } } goto vZdCQ; xW69F: $PcqTW = array(); goto dCAQ4; Zmmgz: } public static function exists($ofwGA) { $K938W = self::getList(); return isset($K938W[$ofwGA]); } }