Ignore:
Timestamp:
Feb 17, 2021, 12:30:23 PM (4 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Log/Log.php

    r894 r899  
    11<?php
    22
    3 class ModuleLog extends AppModule
     3class ModuleLog extends Module
    44{
    55  function __construct(System $System)
     
    1111    $this->License = 'GNU/GPLv3';
    1212    $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());
    1915  }
    2016
     
    9187  }
    9288
    93   static function Cast(AppModule $AppModule): ModuleLog
     89  static function Cast(Module $Module): ModuleLog
    9490  {
    95     if ($AppModule instanceof ModuleLog)
     91    if ($Module instanceof ModuleLog)
    9692    {
    97       return $AppModule;
     93      return $Module;
    9894    }
    99     throw new Exception('Expected ModuleLog type but got '.gettype($AppModule));
     95    throw new Exception('Expected ModuleLog type but got '.gettype($Module));
    10096  }
    10197}
     
    10399class Log extends Model
    104100{
    105   static function GetDesc(): ModelDesc
     101  static function GetModelDesc(): ModelDesc
    106102  {
    107103    $Desc = new ModelDesc(self::GetClassName());
Note: See TracChangeset for help on using the changeset viewer.