Scriptlog Docs

Scriptlog Documentation

Code reference for the Scriptlog codebase

User Tools

Site Tools


scriptlog:lib:utility:downloadsettings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

scriptlog:lib:utility:downloadsettings [2026/09/26 09:09] – admin adminscriptlog:lib:utility:downloadsettings [2026/09/26 09:16] (current) – admin admin
Line 12: Line 12:
 ======= Docblock Metadata ======= ======= Docblock Metadata =======
  
-  ^ Tag ^ Value ^ +^ Tag ^ Value ^ 
-  | ''@category'' | Utility Class | +| ''@category'' | Utility Class | 
-  | ''@author'' | M.Noermoehammad | +| ''@author'' | M.Noermoehammad | 
-  | ''@license'' | MIT | +| ''@license'' | MIT | 
-  | ''@version'' | 1.0 | +| ''@version'' | 1.0 | 
-  | ''@since'' | Since Release 1.0 |+| ''@since'' | Since Release 1.0 |
  
 ======= Inheritance ======= ======= Inheritance =======
Line 25: Line 25:
 ======= Constants (8) ======= ======= Constants (8) =======
  
-  ^ Visibility ^ Name ^ Value ^ Line ^ +^ Visibility ^ Name ^ Value ^ Line ^ 
-  | ''-'' | ''DEFAULT_MIME_TYPES'' | ''[ 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument…'' | 18 | +| ''-'' | ''DEFAULT_MIME_TYPES'' | ''[ 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument…'' | 18 | 
-  | ''-'' | ''DEFAULT_EXPIRY_HOURS'' | ''8;'' | 46 | +| ''-'' | ''DEFAULT_EXPIRY_HOURS'' | ''8;'' | 46 | 
-  | ''-'' | ''KEY_ALLOWED_MIME_TYPES'' | '''download_allowed_mime_types';'' | 48 | +| ''-'' | ''KEY_ALLOWED_MIME_TYPES'' | '''download_allowed_mime_types';'' | 48 | 
-  | ''-'' | ''KEY_EXPIRY_HOURS'' | '''download_expiry_hours';'' | 49 | +| ''-'' | ''KEY_EXPIRY_HOURS'' | '''download_expiry_hours';'' | 49 | 
-  | ''-'' | ''KEY_HOTLINK_PROTECTION'' | '''download_hotlink_protection';'' | 50 | +| ''-'' | ''KEY_HOTLINK_PROTECTION'' | '''download_hotlink_protection';'' | 50 | 
-  | ''-'' | ''KEY_ALLOWED_DOMAINS'' | '''download_allowed_domains';'' | 51 | +| ''-'' | ''KEY_ALLOWED_DOMAINS'' | '''download_allowed_domains';'' | 51 | 
-  | ''-'' | ''KEY_SUPPORT_URL'' | '''download_support_url';'' | 52 | +| ''-'' | ''KEY_SUPPORT_URL'' | '''download_support_url';'' | 52 | 
-  | ''-'' | ''KEY_SUPPORT_LABEL'' | '''download_support_label';'' | 53 |+| ''-'' | ''KEY_SUPPORT_LABEL'' | '''download_support_label';'' | 53 |
  
 ======= Properties (0) ======= ======= Properties (0) =======
Line 41: Line 41:
 ======= Methods (16) ======= ======= Methods (16) =======
  
-  ^ Visibility ^ Method ^ Summary ^ Line ^ +^ Visibility ^ Method ^ Summary ^ Line ^ 
-  | public static | ''getAllowedMimeTypes()'' | Get allowed MIME types from settings | 60 | +| public static | ''getAllowedMimeTypes()'' | Get allowed MIME types from settings | 60 | 
-  | public static | ''setAllowedMimeTypes()'' | Set allowed MIME types | 78 | +| public static | ''setAllowedMimeTypes()'' | Set allowed MIME types | 78 | 
-  | public static | ''getDownloadExpiry()'' | Get download expiry hours | 88 | +| public static | ''getDownloadExpiry()'' | Get download expiry hours | 88 | 
-  | public static | ''setDownloadExpiry()'' | Set download expiry hours | 100 | +| public static | ''setDownloadExpiry()'' | Set download expiry hours | 100 | 
-  | public static | ''isHotlinkProtectionEnabled()'' | Check if hotlink protection is enabled | 110 | +| public static | ''isHotlinkProtectionEnabled()'' | Check if hotlink protection is enabled | 110 | 
-  | public static | ''setHotlinkProtection()'' | Set hotlink protection | 122 | +| public static | ''setHotlinkProtection()'' | Set hotlink protection | 122 | 
-  | public static | ''getAllowedDomains()'' | Get allowed domains for hotlink protection | 132 | +| public static | ''getAllowedDomains()'' | Get allowed domains for hotlink protection | 132 | 
-  | public static | ''setAllowedDomains()'' | Set allowed domains | 150 | +| public static | ''setAllowedDomains()'' | Set allowed domains | 150 | 
-  | public static | ''getSupportUrl()'' | Get support URL | 160 | +| public static | ''getSupportUrl()'' | Get support URL | 160 | 
-  | public static | ''setSupportUrl()'' | Set support URL | 171 | +| public static | ''setSupportUrl()'' | Set support URL | 171 | 
-  | public static | ''getSupportLabel()'' | Get support label | 181 | +| public static | ''getSupportLabel()'' | Get support label | 181 | 
-  | public static | ''setSupportLabel()'' | Set support label | 192 | +| public static | ''setSupportLabel()'' | Set support label | 192 | 
-  | public static | ''getAllSettings()'' | Get all settings as array | 202 | +| public static | ''getAllSettings()'' | Get all settings as array | 202 | 
-  | public static | ''saveSettings()'' | Save all settings at once | 220 | +| public static | ''saveSettings()'' | Save all settings at once | 220 | 
-  | private static | ''getSetting()'' | Get a single setting from database | 257 | +| private static | ''getSetting()'' | Get a single setting from database | 257 | 
-  | private static | ''saveSetting()'' | Save a single setting to database | 281 |+| private static | ''saveSetting()'' | Save a single setting to database | 281 |
  
  
Line 85: Line 85:
 Set allowed MIME types Set allowed MIME types
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$types'' | ''(untyped)'' | //required// | //none// |+|  ''$types'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 116: Line 116:
 Set download expiry hours Set download expiry hours
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$hours'' | ''(untyped)'' | //required// | //none// |+|  ''$hours'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 147: Line 147:
 Set hotlink protection Set hotlink protection
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$enabled'' | ''(untyped)'' | //required// | //none// |+|  ''$enabled'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 178: Line 178:
 Set allowed domains Set allowed domains
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$domains'' | ''(untyped)'' | //required// | //none// |+|  ''$domains'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 209: Line 209:
 Set support URL Set support URL
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$url'' | ''(untyped)'' | //required// | //none// |+|  ''$url'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 240: Line 240:
 Set support label Set support label
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$label'' | ''(untyped)'' | //required// | //none// |+|  ''$label'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 271: Line 271:
 Save all settings at once Save all settings at once
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$settings'' | ''(untyped)'' | //required// | //none// |+|  ''$settings'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
Line 287: Line 287:
 Get a single setting from database Get a single setting from database
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$key'' | ''(untyped)'' | //required// | //none// |+|  ''$key'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — string|null **Returns:** ''(none declared)'' — string|null
Line 303: Line 303:
 Save a single setting to database Save a single setting to database
  
-  ^ Parameter ^ Type ^ Default ^ Description ^ +^  Parameter ^  Type ^  Default ^  Description ^ 
-  | ''$key'' | ''(untyped)'' | //required// | //none// | +|  ''$key'' |  ''(untyped)'' |  //required// |  //none// | 
-  | ''$value'' | ''(untyped)'' | //required// | //none// |+|  ''$value'' |  ''(untyped)'' |  //required// |  //none// |
  
 **Returns:** ''(none declared)'' — bool **Returns:** ''(none declared)'' — bool
scriptlog/lib/utility/downloadsettings.1790413763.txt.gz · Last modified: by admin