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

Legend:

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

    r894 r899  
    11<?php
    22
    3 class ModuleScheduler extends AppModule
     3class ModuleScheduler extends Module
    44{
    55  function __construct(System $System)
     
    99    $this->Version = '1.0';
    1010    $this->Creator = 'Chronos';
    11     $this->License = 'GNU/GPL';
     11    $this->License = 'GNU/GPLv3';
    1212    $this->Description = 'Allow to setup and execute planned and recurring tasks';
    13     $this->Dependencies = array();
    14   }
    15 
    16   function GetModels(): array
    17   {
    18     return array(SchedulerAction::GetClassName(), Scheduler::GetClassName());
     13    $this->Models = array(SchedulerAction::GetClassName(), Scheduler::GetClassName());
    1914  }
    2015
     
    9994  }
    10095
    101   static function Cast(AppModule $AppModule): ModuleScheduler
     96  static function Cast(Module $Module): ModuleScheduler
    10297  {
    103     if ($AppModule instanceof ModuleScheduler)
     98    if ($Module instanceof ModuleScheduler)
    10499    {
    105       return $AppModule;
     100      return $Module;
    106101    }
    107     throw new Exception('Expected ModuleScheduler type but got '.gettype($AppModule));
     102    throw new Exception('Expected ModuleScheduler type but got '.gettype($Module));
    108103  }
    109104}
     
    128123class Scheduler extends Model
    129124{
    130   static function GetDesc(): ModelDesc
     125  static function GetModelDesc(): ModelDesc
    131126  {
    132127    $Desc = new ModelDesc(self::GetClassName());
     
    145140class SchedulerAction extends Model
    146141{
    147   static function GetDesc(): ModelDesc
     142  static function GetModelDesc(): ModelDesc
    148143  {
    149144    $Desc = new ModelDesc(self::GetClassName());
Note: See TracChangeset for help on using the changeset viewer.