Changeset 899 for trunk/Modules/Log/Log.php
- Timestamp:
- Feb 17, 2021, 12:30:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Log/Log.php
r894 r899 1 1 <?php 2 2 3 class ModuleLog extends AppModule3 class ModuleLog extends Module 4 4 { 5 5 function __construct(System $System) … … 11 11 $this->License = 'GNU/GPLv3'; 12 12 $this->Description = 'Logging user actions'; 13 $this->Dependencies = array('User', 'RSS'); 14 } 15 16 function GetModels(): array 17 { 18 return array('Log'); 13 $this->Dependencies = array(ModuleUser::GetName(), ModuleRSS::GetName()); 14 $this->Models = array(Log::GetClassName()); 19 15 } 20 16 … … 91 87 } 92 88 93 static function Cast( AppModule $AppModule): ModuleLog89 static function Cast(Module $Module): ModuleLog 94 90 { 95 if ($ AppModule instanceof ModuleLog)91 if ($Module instanceof ModuleLog) 96 92 { 97 return $ AppModule;93 return $Module; 98 94 } 99 throw new Exception('Expected ModuleLog type but got '.gettype($ AppModule));95 throw new Exception('Expected ModuleLog type but got '.gettype($Module)); 100 96 } 101 97 } … … 103 99 class Log extends Model 104 100 { 105 static function Get Desc(): ModelDesc101 static function GetModelDesc(): ModelDesc 106 102 { 107 103 $Desc = new ModelDesc(self::GetClassName());
Note:
See TracChangeset
for help on using the changeset viewer.