Changeset 899 for trunk/Modules/File/File.php
- Timestamp:
- Feb 17, 2021, 12:30:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/File/File.php
r894 r899 13 13 } 14 14 15 static function Get Desc(): ModelDesc15 static function GetModelDesc(): ModelDesc 16 16 { 17 17 $Desc = new ModelDesc('File'); … … 116 116 class FileDirectory extends Model 117 117 { 118 static function Get Desc(): ModelDesc118 static function GetModelDesc(): ModelDesc 119 119 { 120 120 $Desc = new ModelDesc('FileDirectory'); … … 175 175 } 176 176 177 class ModuleFile extends AppModule177 class ModuleFile extends Module 178 178 { 179 179 public File $File; … … 187 187 $this->License = 'GNU/GPLv3'; 188 188 $this->Description = 'Base module for file management'; 189 $this->Dependencies = array('User'); 189 $this->Dependencies = array(ModuleUser::GetName()); 190 $this->Models = array(FileDirectory::GetClassName(), File::GetClassName()); 190 191 191 192 $this->File = new File($this->System); 192 }193 194 function GetModels(): array195 {196 return array(FileDirectory::GetClassName(), File::GetClassName());197 193 } 198 194 … … 292 288 } 293 289 294 static function Cast( AppModule $AppModule): ModuleFile295 { 296 if ($ AppModule instanceof ModuleFile)297 { 298 return $ AppModule;299 } 300 throw new Exception('Expected ModuleFile type but got '.gettype($ AppModule));301 } 302 } 290 static function Cast(Module $Module): ModuleFile 291 { 292 if ($Module instanceof ModuleFile) 293 { 294 return $Module; 295 } 296 throw new Exception('Expected ModuleFile type but got '.gettype($Module)); 297 } 298 }
Note:
See TracChangeset
for help on using the changeset viewer.