Changeset 899 for trunk/Modules


Ignore:
Timestamp:
Feb 17, 2021, 12:30:23 PM (4 years ago)
Author:
chronos
Message:
Location:
trunk/Modules
Files:
50 edited

Legend:

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

    r894 r899  
    1515*/
    1616
    17 class ModuleAPI extends AppModule
     17class ModuleAPI extends Module
    1818{
    1919  function __construct(System $System)
     
    2323    $this->Version = '1.0';
    2424    $this->Creator = 'Chronos';
    25     $this->License = 'GNU/GPL';
     25    $this->License = 'GNU/GPLv3';
    2626    $this->Description = 'Remote API for support of other clients';
    27     $this->Dependencies = array('User');
     27    $this->Dependencies = array(ModuleUser::GetName());
     28    $this->Models = array(APIToken::GetClassName());
    2829  }
    2930
     
    3233    $this->System->RegisterPage(['api'], 'PageAPI');
    3334  }
    34 
    35   function GetModels(): array
    36   {
    37     return array(APIToken::GetClassName());
    38   }
    3935}
    4036
    4137class ApiToken extends Model
    4238{
    43   static function GetDesc(): ModelDesc
     39  static function GetModelDesc(): ModelDesc
    4440  {
    4541    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/Chat/Chat.php

    r894 r899  
    8585}
    8686
    87 class ModuleChat extends AppModule
     87class ModuleChat extends Module
    8888{
    8989  function __construct(System $System)
     
    9393    $this->Version = '1.0';
    9494    $this->Creator = 'Chronos';
    95     $this->License = 'GNU/GPL';
     95    $this->License = 'GNU/GPLv3';
    9696    $this->Description = 'Show history of IRC chat and previous SunriseChat';
    97     $this->Dependencies = array();
    98   }
    99 
    100   function GetModels(): array
    101   {
    102     return array(ChatHistory::GetClassName());
     97    $this->Models = array(ChatHistory::GetClassName());
    10398  }
    10499
     
    111106class ChatHistory extends Model
    112107{
    113   static function GetDesc(): ModelDesc
     108  static function GetModelDesc(): ModelDesc
    114109  {
    115110    $Desc = new ModelDesc(self::GetClassName());
     
    121116    $Desc->AddInteger('RoomType');
    122117    $Desc->AddString('Host');
    123         return $Desc;
     118    return $Desc;
    124119  }
    125120}
  • trunk/Modules/Config/Config.php

    r897 r899  
    11<?php
    22
    3 class ModuleConfig extends AppModule
     3class ModuleConfig extends Module
    44{
    55  function __construct(System $System)
    66  {
    77    parent::__construct($System);
    8     $this->Name = 'Config';
     8    $this->Name = 'Desc';
    99    $this->Version = '1.0';
    1010    $this->Creator = 'Chronos';
    1111    $this->License = 'GNU/GPLv3';
    1212    $this->Description = 'Configuration support for other modules';
    13     $this->Dependencies = array('System');
    14     $this->Revision = 1;
     13    $this->Dependencies = array(ModuleSystem::GetName());
    1514    $this->Type = ModuleType::System;
    1615  }
    17 
    18   function GetModels(): array
    19   {
    20     return array();
    21   }
    22 
    23   function DoStart(): void
    24   {
    25   }
    2616}
  • trunk/Modules/Customer/Customer.php

    r896 r899  
    11<?php
    22
    3 class ModuleCustomer extends AppModule
     3class ModuleCustomer 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 = 'Customer management';
    13     $this->Dependencies = array('User', 'Finance');
     13    $this->Dependencies = array(ModuleUser::GetName(), ModuleFinance::GetName());
     14    $this->Models = array(Member::GetClassName(), MemberPayment::GetClassName(), SupportActivity::GetClassName(), ServiceCategory::GetClassName(),
     15      Service::GetClassName(), ServiceCustomerRel::GetClassName(), UserCustomerRel::GetClassName());
    1416  }
    1517
     
    199201  }
    200202
    201   function GetModels(): array
    202   {
    203     return array(Member::GetClassName(), MemberPayment::GetClassName(), SupportActivity::GetClassName(), ServiceCategory::GetClassName(),
    204       Service::GetClassName(), ServiceCustomerRel::GetClassName(), UserCustomerRel::GetClassName());
    205   }
    206 
    207203  function ShowDashboardItem(): string
    208204  {
     
    221217class Member extends Model
    222218{
    223   static function GetDesc(): ModelDesc
     219  static function GetModelDesc(): ModelDesc
    224220  {
    225221    $Desc = new ModelDesc(self::GetClassName());
     
    242238class MemberPayment extends Model
    243239{
    244   static function GetDesc(): ModelDesc
     240  static function GetModelDesc(): ModelDesc
    245241  {
    246242    $Desc = new ModelDesc(self::GetClassName());
     
    257253class Service extends Model
    258254{
    259   static function GetDesc(): ModelDesc
     255  static function GetModelDesc(): ModelDesc
    260256  {
    261257    $Desc = new ModelDesc(self::GetClassName());
     
    279275class ServiceCategory extends Model
    280276{
    281   static function GetDesc(): ModelDesc
     277  static function GetModelDesc(): ModelDesc
    282278  {
    283279    $Desc = new ModelDesc(self::GetClassName());
     
    289285class SupportActivity extends Model
    290286{
    291   static function GetDesc(): ModelDesc
     287  static function GetModelDesc(): ModelDesc
    292288  {
    293289    $Desc = new ModelDesc(self::GetClassName());
     
    302298class ServiceCustomerRel extends Model
    303299{
    304   static function GetDesc(): ModelDesc
     300  static function GetModelDesc(): ModelDesc
    305301  {
    306302    $Desc = new ModelDesc(self::GetClassName());
     
    315311class UserCustomerRel extends Model
    316312{
    317   static function GetDesc(): ModelDesc
     313  static function GetModelDesc(): ModelDesc
    318314  {
    319315    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/Document/Document.php

    r894 r899  
    11<?php
    22
    3 class ModuleDocument extends AppModule
     3class ModuleDocument 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 = 'Documents support';
    13     $this->Dependencies = array();
     13    $this->Models = array(FinanceYear::GetClassName(), DocumentLineCode::GetClassName(), DocumentLine::GetClassName(),
     14      DocumentLineSequence::GetClassName());
    1415  }
    1516
     
    7980    ));
    8081  }
    81 
    82   function GetModels(): array
    83   {
    84     return array(FinanceYear::GetClassName(), DocumentLineCode::GetClassName(), DocumentLine::GetClassName(),
    85       DocumentLineSequence::GetClassName());
    86   }
    8782}
    8883
    8984class DocumentLine extends Model
    9085{
    91   static function GetDesc(): ModelDesc
     86  static function GetModelDesc(): ModelDesc
    9287  {
    9388    $Desc = new ModelDesc(self::GetClassName());
     
    10196class DocumentLineCode extends Model
    10297{
    103   static function GetDesc(): ModelDesc
     98  static function GetModelDesc(): ModelDesc
    10499  {
    105100    $Desc = new ModelDesc(self::GetClassName());
     
    112107class DocumentLineSequence extends Model
    113108{
    114   static function GetDesc(): ModelDesc
     109  static function GetModelDesc(): ModelDesc
    115110  {
    116111    $Desc = new ModelDesc(self::GetClassName());
     
    125120class FinanceYear extends Model
    126121{
    127   static function GetDesc(): ModelDesc
     122  static function GetModelDesc(): ModelDesc
    128123  {
    129124    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/EmailQueue/EmailQueue.php

    r894 r899  
    2121class EmailQueue extends Model
    2222{
    23   static function GetDesc(): ModelDesc
     23  static function GetModelDesc(): ModelDesc
    2424  {
    2525    $Desc = new ModelDesc(self::GetClassName());
     
    3636}
    3737
    38 class ModuleEmailQueue extends AppModule
     38class ModuleEmailQueue extends Module
    3939{
    4040  function __construct(System $System)
     
    4646    $this->License = 'GNU/GPLv3';
    4747    $this->Description = 'Queue for delayed email sending and history';
    48     $this->Dependencies = array('Log');
    49   }
    50 
    51   function GetModels(): array
    52   {
    53     return array(EmailQueue::GetClassName());
     48    $this->Dependencies = array(ModuleLog::GetName());
     49    $this->Models = array(EmailQueue::GetClassName());
    5450  }
    5551
     
    123119  }
    124120
    125   static function Cast(AppModule $AppModule): ModuleEmailQueue
     121  static function Cast(Module $Module): ModuleEmailQueue
    126122  {
    127     if ($AppModule instanceof ModuleEmailQueue)
     123    if ($Module instanceof ModuleEmailQueue)
    128124    {
    129       return $AppModule;
     125      return $Module;
    130126    }
    131     throw new Exception('Expected ModuleEmailQueue type but '.gettype($AppModule));
     127    throw new Exception('Expected ModuleEmailQueue type but '.gettype($Module));
    132128  }
    133129}
  • trunk/Modules/Employee/Employee.php

    r894 r899  
    33class Employee extends Model
    44{
    5   static function GetDesc(): ModelDesc
     5  static function GetModelDesc(): ModelDesc
    66  {
    77    $Desc = new ModelDesc(self::GetClassName());
     
    2020class EmployeeSalary extends Model
    2121{
    22   static function GetDesc(): ModelDesc
     22  static function GetModelDesc(): ModelDesc
    2323  {
    2424    $Desc = new ModelDesc(self::GetClassName());
     
    3131}
    3232
    33 class ModuleEmployee extends AppModule
     33class ModuleEmployee extends Module
    3434{
    3535  function __construct(System $System)
     
    3939    $this->Version = '1.0';
    4040    $this->Creator = 'Chronos';
    41     $this->License = 'GNU/GPL';
     41    $this->License = 'GNU/GPLv3';
    4242    $this->Description = 'Employee wages management';
    43     $this->Dependencies = array('User', 'Finance');
    44   }
    45 
    46   function GetModels(): array
    47   {
    48     return array(Employee::GetClassName(), EmployeeSalary::GetClassName());
     43    $this->Dependencies = array(ModuleUser::GetName(), ModuleFinance::GetName());
     44    $this->Models = array(Employee::GetClassName(), EmployeeSalary::GetClassName());
    4945  }
    5046
  • trunk/Modules/Error/Error.php

    r893 r899  
    11<?php
    22
    3 class ModuleError extends AppModule
     3class ModuleError extends Module
    44{
    55  public string $Encoding;
     
    1414    $this->License = 'GNU/GPLv3';
    1515    $this->Description = 'Error logging and reporting';
    16     $this->Dependencies = array('Log');
     16    $this->Dependencies = array(ModuleLog::GetName());
    1717
    1818    $this->ErrorHandler = new ErrorHandler();
  • trunk/Modules/File/File.php

    r894 r899  
    1313  }
    1414
    15   static function GetDesc(): ModelDesc
     15  static function GetModelDesc(): ModelDesc
    1616  {
    1717    $Desc = new ModelDesc('File');
     
    116116class FileDirectory extends Model
    117117{
    118   static function GetDesc(): ModelDesc
     118  static function GetModelDesc(): ModelDesc
    119119  {
    120120    $Desc = new ModelDesc('FileDirectory');
     
    175175}
    176176
    177 class ModuleFile extends AppModule
     177class ModuleFile extends Module
    178178{
    179179  public File $File;
     
    187187    $this->License = 'GNU/GPLv3';
    188188    $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());
    190191
    191192    $this->File = new File($this->System);
    192   }
    193 
    194   function GetModels(): array
    195   {
    196     return array(FileDirectory::GetClassName(), File::GetClassName());
    197193  }
    198194
     
    292288  }
    293289
    294   static function Cast(AppModule $AppModule): ModuleFile
    295   {
    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}
  • trunk/Modules/Finance/Finance.php

    r894 r899  
    88include_once(dirname(__FILE__).'/Trade.php');
    99
    10 class ModuleFinance extends AppModule
     10class ModuleFinance extends Module
    1111{
    1212  public Finance $Finance;
     
    2121    $this->License = 'GNU/GPLv3';
    2222    $this->Description = 'Base module for finance management';
    23     $this->Dependencies = array('File', 'EmailQueue', 'Subject', 'Document');
    24 
    25     $this->Bill = new Bill($this->System);
    26     $this->Finance = new Finance($this->System);
    27   }
    28 
    29   function GetModels(): array
    30   {
    31     return array(FinanceBillingPeriod::GetClassName(), FinanceVatType::GetClassName(), FinanceVat::GetClassName(),
     23    $this->Dependencies = array(ModuleFile::GetName(), ModuleEmailQueue::GetName(), ModuleSubject::GetName(), ModuleDocument::GetName());
     24    $this->Models = array(FinanceBillingPeriod::GetClassName(), FinanceVatType::GetClassName(), FinanceVat::GetClassName(),
    3225      FinanceGroup::GetClassName(), FinanceOperationGroup::GetClassName(), FinanceOperation::GetClassName(),
    3326      FinanceInvoiceGroup::GetClassName(), FinanceInvoice::GetClassName(), FinanceInvoiceItem::GetClassName(),
     
    3528      Currency::GetClassName(), FinanceBank::GetClassName(), FinanceBankAccount::GetClassName(), FinanceCharge::GetClassName(),
    3629      Contract::GetClassName(), FinanceInvoiceOperationRel::GetClassName());
     30
     31    $this->Bill = new Bill($this->System);
     32    $this->Finance = new Finance($this->System);
    3733  }
    3834
     
    632628  }
    633629
    634   static function Cast(AppModule $AppModule): ModuleFinance
    635   {
    636     if ($AppModule instanceof ModuleFinance)
     630  static function Cast(Module $Module): ModuleFinance
     631  {
     632    if ($Module instanceof ModuleFinance)
    637633    {
    638       return $AppModule;
     634      return $Module;
    639635    }
    640     throw new Exception('Expected ModuleFinance type but '.gettype($AppModule));
     636    throw new Exception('Expected ModuleFinance type but '.gettype($Module));
    641637  }
    642638}
  • trunk/Modules/Finance/FinanceModels.php

    r894 r899  
    217217class FinanceGroup extends Model
    218218{
    219   static function GetDesc(): ModelDesc
     219  static function GetModelDesc(): ModelDesc
    220220  {
    221221    $Desc = new ModelDesc(self::GetClassName());
     
    227227class FinanceOperation extends Model
    228228{
    229   static function GetDesc(): ModelDesc
     229  static function GetModelDesc(): ModelDesc
    230230  {
    231231    $Desc = new ModelDesc(self::GetClassName());
     
    250250class FinanceOperationGroup extends Model
    251251{
    252   static function GetDesc(): ModelDesc
     252  static function GetModelDesc(): ModelDesc
    253253  {
    254254    $Desc = new ModelDesc(self::GetClassName());
     
    263263class FinanceInvoice extends Model
    264264{
    265   static function GetDesc(): ModelDesc
     265  static function GetModelDesc(): ModelDesc
    266266  {
    267267    $Desc = new ModelDesc(self::GetClassName());
     
    285285class FinanceInvoiceGroup extends Model
    286286{
    287   static function GetDesc(): ModelDesc
     287  static function GetModelDesc(): ModelDesc
    288288  {
    289289    $Desc = new ModelDesc(self::GetClassName());
     
    298298class Company extends Model
    299299{
    300   static function GetDesc(): ModelDesc
     300  static function GetModelDesc(): ModelDesc
    301301  {
    302302    $Desc = new ModelDesc(self::GetClassName());
     
    309309class FinanceInvoiceItem extends Model
    310310{
    311   static function GetDesc(): ModelDesc
     311  static function GetModelDesc(): ModelDesc
    312312  {
    313313    $Desc = new ModelDesc(self::GetClassName());
     
    323323class FinanceTreasury extends Model
    324324{
    325   static function GetDesc(): ModelDesc
     325  static function GetModelDesc(): ModelDesc
    326326  {
    327327    $Desc = new ModelDesc(self::GetClassName());
     
    334334class FinanceTreasuryCheck extends Model
    335335{
    336   static function GetDesc(): ModelDesc
     336  static function GetModelDesc(): ModelDesc
    337337  {
    338338    $Desc = new ModelDesc(self::GetClassName());
     
    357357class FinanceBankAccount extends Model
    358358{
    359   static function GetDesc(): ModelDesc
     359  static function GetModelDesc(): ModelDesc
    360360  {
    361361    $Desc = new ModelDesc(self::GetClassName());
     
    379379class FinanceBank extends Model
    380380{
    381   static function GetDesc(): ModelDesc
     381  static function GetModelDesc(): ModelDesc
    382382  {
    383383    $Desc = new ModelDesc(self::GetClassName());
     
    392392class Currency extends Model
    393393{
    394   static function GetDesc(): ModelDesc
     394  static function GetModelDesc(): ModelDesc
    395395  {
    396396    $Desc = new ModelDesc(self::GetClassName());
     
    404404class FinanceCharge extends Model
    405405{
    406   static function GetDesc(): ModelDesc
     406  static function GetModelDesc(): ModelDesc
    407407  {
    408408    $Desc = new ModelDesc(self::GetClassName());
     
    422422class FinanceVat extends Model
    423423{
    424   static function GetDesc(): ModelDesc
     424  static function GetModelDesc(): ModelDesc
    425425  {
    426426    $Desc = new ModelDesc(self::GetClassName());
     
    435435class FinanceVatType extends Model
    436436{
    437   static function GetDesc(): ModelDesc
     437  static function GetModelDesc(): ModelDesc
    438438  {
    439439    $Desc = new ModelDesc(self::GetClassName());
     
    445445class Contract extends Model
    446446{
    447   static function GetDesc(): ModelDesc
     447  static function GetModelDesc(): ModelDesc
    448448  {
    449449    $Desc = new ModelDesc(self::GetClassName());
     
    460460class FinanceBillingPeriod extends Model
    461461{
    462   static function GetDesc(): ModelDesc
     462  static function GetModelDesc(): ModelDesc
    463463  {
    464464    $Desc = new ModelDesc(self::GetClassName());
     
    471471class FinanceInvoiceOperationRel extends Model
    472472{
    473   static function GetDesc(): ModelDesc
     473  static function GetModelDesc(): ModelDesc
    474474  {
    475475    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/FinanceBankAPI/FileImport.php

    r887 r899  
    180180  function Insert(): string
    181181  {
    182     $Finance = $ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance;
     182    $Finance = ModuleFinance::Cast($this->System->GetModule('Finance'))->Finance;
    183183    $Output = '';
    184184
  • trunk/Modules/FinanceBankAPI/FinanceBankAPI.php

    r894 r899  
    88class FinanceBankImport extends Model
    99{
    10   static function GetDesc(): ModelDesc
     10  static function GetModelDesc(): ModelDesc
    1111  {
    1212    $Desc = new ModelDesc(self::GetClassName());
     
    2727}
    2828
    29 class ModuleFinanceBankAPI extends AppModule
     29class ModuleFinanceBankAPI extends Module
    3030{
    3131  function __construct(System $System)
     
    3737    $this->License = 'GNU/GPLv3';
    3838    $this->Description = 'Communication through API to various banks, manual file import';
    39     $this->Dependencies = array('Finance', 'Scheduler', 'IS');
    40   }
    41 
    42   function GetModels(): array
    43   {
    44     return array(FinanceBankImport::GetClassName());
     39    $this->Dependencies = array(ModuleFinance::GetName(), ModuleScheduler::GetName(), ModuleIS::GetName());
     40    $this->Models = array(FinanceBankImport::GetClassName());
    4541  }
    4642
  • trunk/Modules/IS/IS.php

    r894 r899  
    845845class Menu extends Model
    846846{
    847   static function GetDesc(): ModelDesc
     847  static function GetModelDesc(): ModelDesc
    848848  {
    849849    $Desc = new ModelDesc(self::GetClassName());
     
    855855class MenuItem extends Model
    856856{
    857   static function GetDesc(): ModelDesc
     857  static function GetModelDesc(): ModelDesc
    858858  {
    859859    $Desc = new ModelDesc(self::GetClassName());
     
    868868class MenuItemFavorite extends Model
    869869{
    870   static function GetDesc(): ModelDesc
     870  static function GetModelDesc(): ModelDesc
    871871  {
    872872    $Desc = new ModelDesc(self::GetClassName());
     
    877877}
    878878
    879 class ModuleIS extends AppModule
     879class ModuleIS extends Module
    880880{
    881881  public array $DashboardItems;
     
    890890    $this->License = 'GNU/GPLv3';
    891891    $this->Description = 'User interface for generic information system';
    892     $this->Dependencies = array('User');
     892    $this->Dependencies = array(ModuleUser::GetName());
     893    $this->Models = array(Menu::GetClassName(), MenuItem::GetClassName(), MenuItemFavorite::GetClassName());
    893894
    894895    $this->DashboardItems = array();
    895   }
    896 
    897   function GetModels(): array
    898   {
    899     return array(Menu::GetClassName(), MenuItem::GetClassName(), MenuItemFavorite::GetClassName());
    900896  }
    901897
     
    956952  }
    957953
    958   static function Cast(AppModule $AppModule): ModuleIS
    959   {
    960     if ($AppModule instanceof ModuleIS)
    961     {
    962       return $AppModule;
    963     }
    964     throw new Exception('Expected ModuleIS type but '.gettype($AppModule));
     954  static function Cast(Module $Module): ModuleIS
     955  {
     956    if ($Module instanceof ModuleIS)
     957    {
     958      return $Module;
     959    }
     960    throw new Exception('Expected ModuleIS type but '.gettype($Module));
    965961  }
    966962}
  • 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());
  • trunk/Modules/Map/Map.php

    r894 r899  
    257257}
    258258
    259 class ModuleMap extends AppModule
     259class ModuleMap extends Module
    260260{
    261261  function __construct(System $System)
     
    265265    $this->Version = '1.0';
    266266    $this->Creator = 'Chronos';
    267     $this->License = 'GNU/GPL';
     267    $this->License = 'GNU/GPLv3';
    268268    $this->Description = 'Show objects on Google maps';
    269     $this->Dependencies = array('Network', 'User');
    270     $this->SupportedModels = array();
     269    $this->Dependencies = array(ModuleNetwork::GetName(), ModuleUser::GetName());
     270    $this->Models = array(MapPosition::GetClassName());
    271271  }
    272272
     
    313313    ));
    314314  }
    315 
    316   function GetModels(): array
    317   {
    318     return array(MapPosition::GetClassName());
    319   }
    320315}
    321316
    322317class MapPosition extends Model
    323318{
    324   static function GetDesc(): ModelDesc
     319  static function GetModelDesc(): ModelDesc
    325320  {
    326321    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/Meals/Meals.php

    r894 r899  
    182182}
    183183
    184 class ModuleMeals extends AppModule
     184class ModuleMeals extends Module
    185185{
    186186  function __construct(System $System)
     
    190190    $this->Version = '1.0';
    191191    $this->Creator = 'Chronos';
    192     $this->License = 'GNU/GPL';
     192    $this->License = 'GNU/GPLv3';
    193193    $this->Description = 'Module for management meals. Can print week menu.';
    194     $this->Dependencies = array('Log');
    195     $this->SupportedModels = array('Meals', 'MealsInfo');
    196   }
    197 
    198   function GetModels(): array
    199   {
    200     return array(Meals::GetClassName(), MealsInfo::GetClassName());
     194    $this->Dependencies = array(ModuleLog::GetName());
     195    $this->Models = array(Meals::GetClassName(), MealsInfo::GetClassName());
    201196  }
    202197
     
    209204class Meals extends Model
    210205{
    211   static function GetDesc(): ModelDesc
     206  static function GetModelDesc(): ModelDesc
    212207  {
    213208    $Desc = new ModelDesc(self::GetClassName());
     
    222217class MealsInfo extends Model
    223218{
    224   static function GetDesc(): ModelDesc
     219  static function GetModelDesc(): ModelDesc
    225220  {
    226221    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/Meteostation/Meteostation.php

    r894 r899  
    7777}
    7878
    79 class ModuleMeteoStation extends AppModule
     79class ModuleMeteoStation extends Module
    8080{
    8181  function __construct(System $System)
     
    8787    $this->License = 'GNU/GPLv3';
    8888    $this->Description = 'Gathering and presentation of data from network meteostation.';
    89     $this->Dependencies = array();
    9089  }
    9190
  • trunk/Modules/Monitoring/Monitoring.php

    r895 r899  
    11<?php
    22
    3 class ModuleMonitoring extends AppModule
     3class ModuleMonitoring extends Module
    44{
    55  function __construct(System $System)
     
    1111    $this->License = 'GNU/GPLv3';
    1212    $this->Description = 'Monitoring for various states';
    13     $this->Dependencies = array();
    1413  }
    1514
  • trunk/Modules/Network/Network.php

    r895 r899  
    100100}
    101101
    102 class ModuleNetwork extends AppModule
     102class ModuleNetwork extends Module
    103103{
    104104  public int $MinNotifyTime;
     
    112112    $this->License = 'GNU/GPLv3';
    113113    $this->Description = 'Networking related tools';
    114     $this->Dependencies = array('Notify', 'IS');
    115 
    116     // TODO: Make notify time configurable
    117     $this->MinNotifyTime = 30; // seconds
    118   }
    119 
    120   function GetModels(): array
    121   {
    122     return array(NetworkDomainAlias::GetClassName(), NetworkDevice::GetClassName(), NetworkDeviceType::GetClassName(),
     114    $this->Dependencies = array(ModuleNotify::GetName(), ModuleIS::GetName());
     115    $this->Models = array(NetworkDomainAlias::GetClassName(), NetworkDevice::GetClassName(), NetworkDeviceType::GetClassName(),
    123116      NetworkDeviceLog::GetClassName(), NetworkInterface::GetClassName(), NetworkInterfaceType::GetClassName(),
    124117      NetworkSubnet::GetClassName(), NetworkPort::GetClassName(), NetworkSpeedLimit::GetClassName(),
     
    128121      NetworkDomainItemFilter::GetClassName(), DeviceAPIType::GetClassName(), NetworkInterfaceWireless::GetClassName(),
    129122      NetworkInterfaceUpDown::GetClassName(), NetworkPortUpDown::GetClassName());
     123
     124    // TODO: Make notify time configurable
     125    $this->MinNotifyTime = 30; // seconds
    130126  }
    131127
  • trunk/Modules/Network/NetworkModels.php

    r895 r899  
    33class NetworkDomainAlias extends Model
    44{
    5   static function GetDesc(): ModelDesc
     5  static function GetModelDesc(): ModelDesc
    66  {
    77    $Desc = new ModelDesc(self::GetClassName());
     
    1616class NetworkDevice extends Model
    1717{
    18   static function GetDesc(): ModelDesc
     18  static function GetModelDesc(): ModelDesc
    1919  {
    2020    $Desc = new ModelDesc(self::GetClassName());
     
    3939class NetworkDeviceType extends Model
    4040{
    41   static function GetDesc(): ModelDesc
     41  static function GetModelDesc(): ModelDesc
    4242  {
    4343    $Desc = new ModelDesc(self::GetClassName());
     
    5151class NetworkDeviceLog extends Model
    5252{
    53   static function GetDesc(): ModelDesc
     53  static function GetModelDesc(): ModelDesc
    5454  {
    5555    $Desc = new ModelDesc(self::GetClassName());
     
    6464class NetworkInterface extends Model
    6565{
    66   static function GetDesc(): ModelDesc
     66  static function GetModelDesc(): ModelDesc
    6767  {
    6868    $Desc = new ModelDesc(self::GetClassName());
     
    8383class NetworkInterfaceType extends Model
    8484{
    85   static function GetDesc(): ModelDesc
     85  static function GetModelDesc(): ModelDesc
    8686  {
    8787    $Desc = new ModelDesc(self::GetClassName());
     
    9696class NetworkSubnet extends Model
    9797{
    98   static function GetDesc(): ModelDesc
     98  static function GetModelDesc(): ModelDesc
    9999  {
    100100    $Desc = new ModelDesc(self::GetClassName());
     
    121121class NetworkPort extends Model
    122122{
    123   static function GetDesc(): ModelDesc
     123  static function GetModelDesc(): ModelDesc
    124124  {
    125125    $Desc = new ModelDesc(self::GetClassName());
     
    137137class NetworkSpeedLimit extends Model
    138138{
    139   static function GetDesc(): ModelDesc
     139  static function GetModelDesc(): ModelDesc
    140140  {
    141141    $Desc = new ModelDesc(self::GetClassName());
     
    150150class NetworkInterfaceLatency extends Model
    151151{
    152   static function GetDesc(): ModelDesc
     152  static function GetModelDesc(): ModelDesc
    153153  {
    154154    $Desc = new ModelDesc(self::GetClassName());
     
    162162class NetworkLink extends Model
    163163{
    164   static function GetDesc(): ModelDesc
     164  static function GetModelDesc(): ModelDesc
    165165  {
    166166    $Desc = new ModelDesc(self::GetClassName());
     
    174174class NetworkLinkType extends Model
    175175{
    176   static function GetDesc(): ModelDesc
     176  static function GetModelDesc(): ModelDesc
    177177  {
    178178    $Desc = new ModelDesc(self::GetClassName());
     
    188188class NetworkSignal extends Model
    189189{
    190   static function GetDesc(): ModelDesc
     190  static function GetModelDesc(): ModelDesc
    191191  {
    192192    $Desc = new ModelDesc(self::GetClassName());
     
    204204class NetworkAddressCategory extends Model
    205205{
    206   static function GetDesc(): ModelDesc
     206  static function GetModelDesc(): ModelDesc
    207207  {
    208208    $Desc = new ModelDesc(self::GetClassName());
     
    214214class NetworkDomain extends Model
    215215{
    216   static function GetDesc(): ModelDesc
     216  static function GetModelDesc(): ModelDesc
    217217  {
    218218    $Desc = new ModelDesc(self::GetClassName());
     
    232232class NetworkDomainServer extends Model
    233233{
    234   static function GetDesc(): ModelDesc
     234  static function GetModelDesc(): ModelDesc
    235235  {
    236236    $Desc = new ModelDesc(self::GetClassName());
     
    244244class NetworkDomainView extends Model
    245245{
    246   static function GetDesc(): ModelDesc
     246  static function GetModelDesc(): ModelDesc
    247247  {
    248248    $Desc = new ModelDesc(self::GetClassName());
     
    257257class NetworkDomainItemFilter extends Model
    258258{
    259   static function GetDesc(): ModelDesc
     259  static function GetModelDesc(): ModelDesc
    260260  {
    261261    $Desc = new ModelDesc(self::GetClassName());
     
    272272class DeviceAPIType extends Model
    273273{
    274   static function GetDesc(): ModelDesc
     274  static function GetModelDesc(): ModelDesc
    275275  {
    276276    $Desc = new ModelDesc(self::GetClassName());
     
    282282class NetworkInterfaceWireless extends Model
    283283{
    284   static function GetDesc(): ModelDesc
     284  static function GetModelDesc(): ModelDesc
    285285  {
    286286    $Desc = new ModelDesc(self::GetClassName());
     
    305305class NetworkDeviceConfig extends Model
    306306{
    307   static function GetDesc(): ModelDesc
     307  static function GetModelDesc(): ModelDesc
    308308  {
    309309    $Desc = new ModelDesc(self::GetClassName());
     
    318318class NetworkInterfaceUpDown extends Model
    319319{
    320   static function GetDesc(): ModelDesc
     320  static function GetModelDesc(): ModelDesc
    321321  {
    322322    $Desc = new ModelDesc(self::GetClassName());
     
    331331class NetworkPortUpDown extends Model
    332332{
    333   static function GetDesc(): ModelDesc
     333  static function GetModelDesc(): ModelDesc
    334334  {
    335335    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/NetworkConfig/NetworkConfig.php

    r894 r899  
    11<?php
    22
    3 class ModuleNetworkConfig extends AppModule
     3class ModuleNetworkConfig extends Module
    44{
    55  public array $ConfigItems;
     
    1111    $this->Version = '1.0';
    1212    $this->Creator = 'Chronos';
    13     $this->License = 'GNU/GPL';
     13    $this->License = 'GNU/GPLv3';
    1414    $this->Description = 'Network device remote configuration';
    15     $this->Dependencies = array('Network');
     15    $this->Dependencies = array(ModuleNetwork::GetName());
     16    $this->Models = array(NetworkConfigurationLog::GetClassName(), NetworkConfiguration::GetClassName());
     17
    1618    $this->ConfigItems = array();
    17   }
    18 
    19   function GetModels(): array
    20   {
    21     return array(NetworkConfigurationLog::GetClassName(), NetworkConfiguration::GetClassName());
    2219  }
    2320
     
    9087  }
    9188
    92   static function Cast(AppModule $AppModule): ModuleNetworkConfig
     89  static function Cast(Module $Module): ModuleNetworkConfig
    9390  {
    94     if ($AppModule instanceof ModuleNetworkConfig)
     91    if ($Module instanceof ModuleNetworkConfig)
    9592    {
    96       return $AppModule;
     93      return $Module;
    9794    }
    98     throw new Exception('Expected ModuleNetworkConfig type but got '.gettype($AppModule));
     95    throw new Exception('Expected ModuleNetworkConfig type but got '.gettype($Module));
    9996  }
    10097}
     
    109106class NetworkConfiguration extends Model
    110107{
    111   static function GetDesc(): ModelDesc
     108  static function GetModelDesc(): ModelDesc
    112109  {
    113110    $Desc = new ModelDesc(self::GetClassName());
     
    125122class NetworkConfigurationLog extends Model
    126123{
    127   static function GetDesc(): ModelDesc
     124  static function GetModelDesc(): ModelDesc
    128125  {
    129126    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/NetworkConfigAirOS/NetworkConfigAirOS.php

    r894 r899  
    33include_once(dirname(__FILE__).'/Generators/Signal.php');
    44
    5 class ModuleNetworkConfigAirOS extends AppModule
     5class ModuleNetworkConfigAirOS extends Module
    66{
    77  function __construct(System $System)
     
    1111    $this->Version = '1.0';
    1212    $this->Creator = 'Chronos';
    13     $this->License = 'GNU/GPL';
     13    $this->License = 'GNU/GPLv3';
    1414    $this->Description = 'Network service configuration of Ubiquity AirOS devices';
    15     $this->Dependencies = array('NetworkConfig');
     15    $this->Dependencies = array(ModuleNetworkConfig::GetName());
    1616  }
    1717
  • trunk/Modules/NetworkConfigLinux/NetworkConfigLinux.php

    r894 r899  
    55include_once(dirname(__FILE__).'/Generators/Latency.php');
    66
    7 class ModuleNetworkConfigLinux extends AppModule
     7class ModuleNetworkConfigLinux extends Module
    88{
    99  function __construct(System $System)
     
    1515    $this->License = 'GNU/GPL';
    1616    $this->Description = 'Network service configuration of Linux server';
    17     $this->Dependencies = array('NetworkConfig');
     17    $this->Dependencies = array(ModuleNetworkConfig::GetName());
    1818  }
    1919
  • trunk/Modules/NetworkConfigRouterOS/Generators/Queue.php

    r887 r899  
    273273    echo($Main->Print());
    274274    $ItemsQueue = $Main->GetCommands();
    275     //print_r($ItemsQueue);
    276     //die();
    277 
    278     //print_r($ItemsQueue);
    279275    $Routerboard->ListUpdate($PathQueue, array('name', 'limit-at', 'max-limit', 'parent', 'packet-mark'), $ItemsQueue, array(), true);
    280276  }
  • trunk/Modules/NetworkConfigRouterOS/NetworkConfigRouterOS.php

    r894 r899  
    1616include_once(dirname(__FILE__).'/Generators/Queue.php');
    1717
    18 class ModuleNetworkConfigRouterOS extends AppModule
     18class ModuleNetworkConfigRouterOS extends Module
    1919{
    2020  function __construct(System $System)
     
    2424    $this->Version = '1.0';
    2525    $this->Creator = 'Chronos';
    26     $this->License = 'GNU/GPL';
     26    $this->License = 'GNU/GPLv3';
    2727    $this->Description = 'Mikrotik RouterOS configuration';
    28     $this->Dependencies = array('NetworkConfig');
     28    $this->Dependencies = array(ModuleNetworkConfig::GetName());
    2929  }
    3030
  • trunk/Modules/NetworkShare/NetworkShare.php

    r894 r899  
    55include_once('SharePage.php');
    66
    7 class ModuleNetworkShare extends AppModule
     7class ModuleNetworkShare extends Module
    88{
    99  function __construct(System $System)
     
    1313    $this->Version = '1.0';
    1414    $this->Creator = 'Chronos';
    15     $this->License = 'GNU/GPL';
     15    $this->License = 'GNU/GPLv3';
    1616    $this->Description = 'System for loading network computer share file list and allow fast searching.';
    17     $this->Dependencies = array('Network');
    18   }
    19 
    20   function GetModels(): array
    21   {
    22     return array(NetworkShareItem::GetClassName(), NetworkShareError::GetClassName());
     17    $this->Dependencies = array(ModuleNetwork::GetName());
     18    $this->Models = array(NetworkShareItem::GetClassName(), NetworkShareError::GetClassName());
    2319  }
    2420
     
    3127class NetworkShareItem extends Model
    3228{
    33   static function GetDesc(): ModelDesc
     29  static function GetModelDesc(): ModelDesc
    3430  {
    3531    $Desc = new ModelDesc('NetworkShareItem');
     
    4743class NetworkShareError extends Model
    4844{
    49   static function GetDesc(): ModelDesc
     45  static function GetModelDesc(): ModelDesc
    5046  {
    5147    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/NetworkShare/browse.php

    r874 r899  
    3838}
    3939//ShowArray($Shares);
    40 //die();
    4140
    4241// Analyzuj slozku a projdi podslozky
  • trunk/Modules/NetworkTopology/NetworkTopology.php

    r894 r899  
    135135}
    136136
    137 class ModuleNetworkTopology extends AppModule
     137class ModuleNetworkTopology extends Module
    138138{
    139139  function __construct(System $System)
     
    143143    $this->Version = '1.0';
    144144    $this->Creator = 'Chronos';
    145     $this->License = 'GNU/GPL';
     145    $this->License = 'GNU/GPLv3';
    146146    $this->Description = 'Generate image of network device interconnection';
    147     $this->Dependencies = array('Network');
    148   }
    149 
    150   function GetModels(): array
    151   {
    152     return array(NetworkTopology::GetClassName());
     147    $this->Dependencies = array(ModuleNetwork::GetName());
     148    $this->Models = array(NetworkTopology::GetClassName());
    153149  }
    154150
     
    161157class NetworkTopology extends Model
    162158{
    163   static function GetDesc(): ModelDesc
     159  static function GetModelDesc(): ModelDesc
    164160  {
    165161    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/News/News.php

    r894 r899  
    1111}
    1212
    13 class ModuleNews extends AppModule
     13class ModuleNews extends Module
    1414{
    1515  public int $NewsCountPerCategory = 3;
     
    2222    $this->Version = '1.0';
    2323    $this->Creator = 'Chronos';
    24     $this->License = 'GNU/GPL';
     24    $this->License = 'GNU/GPLv3';
    2525    $this->Description = 'News and news groups management';
    26     $this->Dependencies = array('User', 'Log', 'File');
     26    $this->Dependencies = array(ModuleUser::GetName(), ModuleLog::GetName(), ModuleFile::GetName());
    2727    $this->SupportedModules = array('Search');
    28   }
    29 
    30   function GetModels(): array
    31   {
    32     return array(NewsCategory::GetClassName(), News::GetClassName());
     28    $this->Models = array(NewsCategory::GetClassName(), News::GetClassName());
    3329  }
    3430
     
    272268  }
    273269
    274   static function Cast(AppModule $AppModule): ModuleNews
    275   {
    276     if ($AppModule instanceof ModuleNews)
    277     {
    278       return $AppModule;
    279     }
    280     throw new Exception('Expected ModuleNews type but got '.gettype($AppModule));
     270  static function Cast(Module $Module): ModuleNews
     271  {
     272    if ($Module instanceof ModuleNews)
     273    {
     274      return $Module;
     275    }
     276    throw new Exception('Expected ModuleNews type but got '.gettype($Module));
    281277  }
    282278}
     
    284280class News extends Model
    285281{
    286   static function GetDesc(): ModelDesc
     282  static function GetModelDesc(): ModelDesc
    287283  {
    288284    $Desc = new ModelDesc(self::GetClassName());
     
    302298class NewsCategory extends Model
    303299{
    304   static function GetDesc(): ModelDesc
     300  static function GetModelDesc(): ModelDesc
    305301  {
    306302    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/Notify/Notify.php

    r894 r899  
    33define('CONTACT_CATEGORY_EMAIL', 4);
    44
    5 class ModuleNotify extends AppModule
     5class ModuleNotify extends Module
    66{
    77  public array $Checks;
     
    1313    $this->Version = '1.0';
    1414    $this->Creator = 'Chronos';
    15     $this->License = 'GNU/GPL';
     15    $this->License = 'GNU/GPLv3';
    1616    $this->Description = 'Send notification messages to selected users';
    17     $this->Dependencies = array('User', 'RSS');
     17    $this->Dependencies = array(ModuleUser::GetName(), ModuleRSS::GetName());
     18    $this->Models = array(NotifyCategory::GetClassName(), NotifyUser::GetClassName());
     19
    1820    $this->Checks = array();
    1921  }
     
    128130  }
    129131
    130   function GetModels(): array
    131   {
    132     return array(NotifyCategory::GetClassName(), NotifyUser::GetClassName());
    133   }
    134 
    135132  function DoInstall(): void
    136133  {
     
    176173  }
    177174
    178   static function Cast(AppModule $AppModule): ModuleNotify
    179   {
    180     if ($AppModule instanceof ModuleNotify)
    181     {
    182       return $AppModule;
    183     }
    184     throw new Exception('Expected ModuleNotify type but got '.gettype($AppModule));
     175  static function Cast(Module $Module): ModuleNotify
     176  {
     177    if ($Module instanceof ModuleNotify)
     178    {
     179      return $Module;
     180    }
     181    throw new Exception('Expected ModuleNotify type but got '.gettype($Module));
    185182  }
    186183}
     
    188185class NotifyCategory extends Model
    189186{
    190   static function GetDesc(): ModelDesc
     187  static function GetModelDesc(): ModelDesc
    191188  {
    192189    $Desc = new ModelDesc(self::GetClassName());
     
    199196class NotifyUser extends Model
    200197{
    201   static function GetDesc(): ModelDesc
     198  static function GetModelDesc(): ModelDesc
    202199  {
    203200    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/OpeningHours/OpeningHours.php

    r894 r899  
    215215}
    216216
    217 class ModuleOpeningHours extends AppModule
     217class ModuleOpeningHours extends Module
    218218{
    219219  function __construct(System $System)
     
    223223    $this->Version = '1.0';
    224224    $this->Creator = 'Chronos';
    225     $this->License = 'GNU/GPL';
     225    $this->License = 'GNU/GPLv3';
    226226    $this->Description = 'Show subject opening hours with time to open or time to close';
    227     $this->Dependencies = array();
    228   }
    229 
    230   function GetModels(): array
    231   {
    232     return array(SubjectOpenTime::GetClassName(), SubjectOpenTimeDay::GetClassName());
     227    $this->Models = array(SubjectOpenTime::GetClassName(), SubjectOpenTimeDay::GetClassName());
    233228  }
    234229
     
    246241class SubjectOpenTime extends Model
    247242{
    248   static function GetDesc(): ModelDesc
     243  static function GetModelDesc(): ModelDesc
    249244  {
    250245    $Desc = new ModelDesc(self::GetClassName());
     
    259254class SubjectOpenTimeDay extends Model
    260255{
    261   static function GetDesc(): ModelDesc
     256  static function GetModelDesc(): ModelDesc
    262257  {
    263258    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/Portal/Portal.php

    r896 r899  
    33include_once(dirname(__FILE__).'/../../Common/Global.php');
    44
    5 class ModulePortal extends AppModule
     5class ModulePortal extends Module
    66{
    77  function __construct(System $System)
     
    1313    $this->License = 'GNU/GPLv3';
    1414    $this->Description = 'Community portal.';
    15     $this->Dependencies = array('News', 'User');
    16   }
    17 
    18   function GetModels(): array
    19   {
    20     return array(Panel::GetClassName(), PanelColumn::GetClassName());
     15    $this->Dependencies = array(ModuleNews::GetName(), ModuleUser::GetName());
     16    $this->Models = array(Panel::GetClassName(), PanelColumn::GetClassName());
    2117  }
    2218
     
    6561class PanelColumn extends Model
    6662{
    67   static function GetDesc(): ModelDesc
     63  static function GetModelDesc(): ModelDesc
    6864  {
    6965    $Desc = new ModelDesc(self::GetClassName());
     
    7571class Panel extends Model
    7672{
    77   static function GetDesc(): ModelDesc
     73  static function GetModelDesc(): ModelDesc
    7874  {
    7975    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/RSS/RSS.php

    r887 r899  
    11<?php
    22
    3 class ModuleRSS extends AppModule
     3class ModuleRSS extends Module
    44{
    55  public array $RSSChannels;
     
    1111    $this->Version = '1.0';
    1212    $this->Creator = 'Chronos';
    13     $this->License = 'GNU/GPL';
     13    $this->License = 'GNU/GPLv3';
    1414    $this->Description = 'Web site RSS channel management';
    15     $this->Dependencies = array();
    1615    $this->RSSChannels = array();
    1716  }
     
    2019  {
    2120    $this->System->RegisterPage(['rss'], 'PageRSS');
    22     $this->System->RegisterPageHeader('RSS', array($this, 'ShowRSSHeader'));
     21    Core::Cast($this->System)->RegisterPageHeader('RSS', array($this, 'ShowRSSHeader'));
    2322  }
    2423
     
    5251  }
    5352
    54   static function Cast(AppModule $AppModule): ModuleRSS
     53  static function Cast(Module $Module): ModuleRSS
    5554  {
    56     if ($AppModule instanceof ModuleRSS)
     55    if ($Module instanceof ModuleRSS)
    5756    {
    58       return $AppModule;
     57      return $Module;
    5958    }
    60     throw new Exception('Expected ModuleRSS type but got '.gettype($AppModule));
     59    throw new Exception('Expected ModuleRSS type but got '.gettype($Module));
    6160  }
    6261}
  • 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());
  • trunk/Modules/Search/Search.php

    r894 r899  
    4747}
    4848
    49 class ModuleSearch extends AppModule
     49class ModuleSearch extends Module
    5050{
    5151  public array $Items;
     
    5858    $this->Version = '1.0';
    5959    $this->Creator = 'Chronos';
    60     $this->License = 'GNU/GPL';
     60    $this->License = 'GNU/GPLv3';
    6161    $this->Description = 'Allow search through registered content objects';
    62     $this->Dependencies = array();
     62
    6363    $this->MaxItemCount = 10;
    6464    $this->Items = array();
     
    7575  }
    7676
    77   static function Cast(AppModule $AppModule): ModuleSearch
     77  static function Cast(Module $Module): ModuleSearch
    7878  {
    79     if ($AppModule instanceof ModuleSearch)
     79    if ($Module instanceof ModuleSearch)
    8080    {
    81       return $AppModule;
     81      return $Module;
    8282    }
    83     throw new Exception('Expected ModuleSearch type but got '.gettype($AppModule));
     83    throw new Exception('Expected ModuleSearch type but got '.gettype($Module));
    8484  }
    8585}
  • trunk/Modules/SpeedTest/SpeedTest.php

    r887 r899  
    1212###############################################################################
    1313
    14 class ModuleSpeedTest extends AppModule
     14class ModuleSpeedTest extends Module
    1515{
    1616  function __construct(System $System)
     
    2020    $this->Version = '1.0';
    2121    $this->Creator = 'Chronos';
    22     $this->License = 'GNU/GPL';
     22    $this->License = 'GNU/GPLv3';
    2323    $this->Description = 'Testing of download and upload bandwidth';
    24     $this->Dependencies = array();
    2524  }
    2625
  • trunk/Modules/Stock/Stock.php

    r894 r899  
    11<?php
    22
    3 class ModuleStock extends AppModule
     3class ModuleStock 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 = 'Stock and products';
    13     $this->Dependencies = array('User', 'Customer', 'Network');
    14   }
    15 
    16   function GetModels(): array
    17   {
    18     return array(Product::GetClassName(), StockSerialNumber::GetClassName(), Stock::GetClassName(),
     13    $this->Dependencies = array(ModuleUser::GetName(), ModuleCustomer::GetName(), ModuleNetwork::GetName());
     14    $this->Models = array(Product::GetClassName(), StockSerialNumber::GetClassName(), Stock::GetClassName(),
    1915      StockMoveGroup::GetClassName(), StockMove::GetClassName(), StockMoveItem::GetClassName(),
    2016      StockItemHistory::GetClassName(), StockMoveItemSerialRel::GetClassName());
     
    266262class Product extends Model
    267263{
    268   static function GetDesc(): ModelDesc
     264  static function GetModelDesc(): ModelDesc
    269265  {
    270266    $Desc = new ModelDesc(self::GetClassName());
     
    285281class StockSerialNumber extends Model
    286282{
    287   static function GetDesc(): ModelDesc
     283  static function GetModelDesc(): ModelDesc
    288284  {
    289285    $Desc = new ModelDesc(self::GetClassName());
     
    305301class Stock extends Model
    306302{
    307   static function GetDesc(): ModelDesc
     303  static function GetModelDesc(): ModelDesc
    308304  {
    309305    $Desc = new ModelDesc(self::GetClassName());
     
    315311class StockMove extends Model
    316312{
    317   static function GetDesc(): ModelDesc
     313  static function GetModelDesc(): ModelDesc
    318314  {
    319315    $Desc = new ModelDesc(self::GetClassName());
     
    328324class StockMoveItem extends Model
    329325{
    330   static function GetDesc(): ModelDesc
     326  static function GetModelDesc(): ModelDesc
    331327  {
    332328    $Desc = new ModelDesc(self::GetClassName());
     
    341337class StockMoveGroup extends Model
    342338{
    343   static function GetDesc(): ModelDesc
     339  static function GetModelDesc(): ModelDesc
    344340  {
    345341    $Desc = new ModelDesc(self::GetClassName());
     
    354350class StockItemHistory extends Model
    355351{
    356   static function GetDesc(): ModelDesc
     352  static function GetModelDesc(): ModelDesc
    357353  {
    358354    $Desc = new ModelDesc(self::GetClassName());
     
    366362class StockMoveItemSerialRel extends Model
    367363{
    368   static function GetDesc(): ModelDesc
     364  static function GetModelDesc(): ModelDesc
    369365  {
    370366    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/Subject/Subject.php

    r897 r899  
    11<?php
    22
    3 class ModuleSubject extends AppModule
     3class ModuleSubject 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 = 'Subject management';
    13     $this->Dependencies = array('User', 'Map');
     13    $this->Dependencies = array(ModuleUser::GetName(), ModuleMap::GetName());
     14    $this->Models = array(Subject::GetClassName(), ContactCategory::GetClassName(),
     15      Contact::GetClassName());
    1416  }
    1517
     
    131133  }
    132134
    133   function GetModels(): array
    134   {
    135     return array(Subject::GetClassName(), ContactCategory::GetClassName(),
    136       Contact::GetClassName());
    137   }
    138 
    139135  function ShowDashboardItem(): string
    140136  {
     
    148144class Subject extends Model
    149145{
    150   static function GetDesc(): ModelDesc
     146  static function GetModelDesc(): ModelDesc
    151147  {
    152148    $Desc = new ModelDesc(self::GetClassName());
     
    168164class Contact extends Model
    169165{
    170   static function GetDesc(): ModelDesc
     166  static function GetModelDesc(): ModelDesc
    171167  {
    172168    $Desc = new ModelDesc(self::GetClassName());
     
    183179class ContactCategory extends Model
    184180{
    185   static function GetDesc(): ModelDesc
     181  static function GetModelDesc(): ModelDesc
    186182  {
    187183    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/System/System.php

    r897 r899  
    33include_once(dirname(__FILE__).'/SystemModels.php');
    44
    5 class ModuleSystem extends AppModule
     5class ModuleSystem extends Module
    66{
    77  public bool $InstalledChecked;
     
    1313    $this->Version = '1.0';
    1414    $this->Creator = 'Chronos';
    15     $this->License = 'GNU/GPL';
     15    $this->License = 'GNU/GPLv3';
    1616    $this->Description = 'Base system module';
    17     $this->Dependencies = array();
    1817    $this->Type = ModuleType::System;
    19   }
    20 
    21   function GetModels(): array
    22   {
    23     return array(UnitOfMeasure::GetClassName(), ActionIcon::GetClassName(), ActionGroup::GetClassName(),
     18    $this->Models = array(UnitOfMeasure::GetClassName(), ActionIcon::GetClassName(), ActionGroup::GetClassName(),
    2419      ActionType::GetClassName(), Action::GetClassName(), Language::GetClassName(), Country::GetClassName());
    2520  }
     
    141136  }
    142137
    143   static function Cast(AppModule $AppModule): ModuleSystem
     138  static function Cast(Module $Module): ModuleSystem
    144139  {
    145     if ($AppModule instanceof ModuleSystem)
     140    if ($Module instanceof ModuleSystem)
    146141    {
    147       return $AppModule;
     142      return $Module;
    148143    }
    149     throw new Exception('Expected ModuleSystem type but got '.gettype($AppModule));
     144    throw new Exception('Expected ModuleSystem type but got '.gettype($Module));
    150145  }
    151146
  • trunk/Modules/System/SystemModels.php

    r895 r899  
    33class UnitOfMeasure extends Model
    44{
    5   static function GetDesc(): ModelDesc
     5  static function GetModelDesc(): ModelDesc
    66  {
    77    $Desc = new ModelDesc(self::GetClassName());
     
    1414class Action extends Model
    1515{
    16   static function GetDesc(): ModelDesc
     16  static function GetModelDesc(): ModelDesc
    1717  {
    1818    $Desc = new ModelDesc(self::GetClassName());
     
    3030class ActionIcon extends Model
    3131{
    32   static function GetDesc(): ModelDesc
     32  static function GetModelDesc(): ModelDesc
    3333  {
    3434    $Desc = new ModelDesc(self::GetClassName());
     
    4040class ActionGroup extends Model
    4141{
    42   static function GetDesc(): ModelDesc
     42  static function GetModelDesc(): ModelDesc
    4343  {
    4444    $Desc = new ModelDesc(self::GetClassName());
     
    5050class ActionType extends Model
    5151{
    52   static function GetDesc(): ModelDesc
     52  static function GetModelDesc(): ModelDesc
    5353  {
    5454    $Desc = new ModelDesc(self::GetClassName());
     
    6060class Language extends Model
    6161{
    62   static function GetDesc(): ModelDesc
     62  static function GetModelDesc(): ModelDesc
    6363  {
    6464    $Desc = new ModelDesc(self::GetClassName());
     
    7070class Country extends Model
    7171{
    72   static function GetDesc(): ModelDesc
     72  static function GetModelDesc(): ModelDesc
    7373  {
    7474    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/TV/TV.php

    r894 r899  
    9999}
    100100
    101 class ModuleTV extends AppModule
     101class ModuleTV extends Module
    102102{
    103103  function __construct(System $System)
     
    109109    $this->License = 'GNU/GPLv3';
    110110    $this->Description = 'Television channels management';
    111     $this->Dependencies = array();
    112   }
    113 
    114   function GetModels(): array
    115   {
    116     return array(TVGroup::GetClassName(), TV::GetClassName());
     111    $this->Models = array(TVGroup::GetClassName(), TV::GetClassName());
    117112  }
    118113
     
    166161class TVGroup extends Model
    167162{
    168   static function GetDesc(): ModelDesc
     163  static function GetModelDesc(): ModelDesc
    169164  {
    170165    $Desc = new ModelDesc(self::GetClassName());
     
    176171class TV extends Model
    177172{
    178   static function GetDesc(): ModelDesc
     173  static function GetModelDesc(): ModelDesc
    179174  {
    180175    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/Task/Task.php

    r894 r899  
    11<?php
    22
    3 class ModuleTask extends AppModule
     3class ModuleTask 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 = 'Work and task management';
    13     $this->Dependencies = array('User');
    14   }
    15 
    16   function GetModels(): array
    17   {
    18     return array(TaskGroup::GetClassName(), Task::GetClassName(), Work::GetClassName());
     13    $this->Dependencies = array(ModuleUser::GetName());
     14    $this->Models = array(TaskGroup::GetClassName(), Task::GetClassName(), Work::GetClassName());
    1915  }
    2016
     
    109105class Task extends Model
    110106{
    111   static function GetDesc(): ModelDesc
     107  static function GetModelDesc(): ModelDesc
    112108  {
    113109    $Desc = new ModelDesc(self::GetClassName());
     
    129125class TaskGroup extends Model
    130126{
    131   static function GetDesc(): ModelDesc
     127  static function GetModelDesc(): ModelDesc
    132128  {
    133129    $Desc = new ModelDesc(self::GetClassName());
     
    141137class Work extends Model
    142138{
    143   static function GetDesc(): ModelDesc
     139  static function GetModelDesc(): ModelDesc
    144140  {
    145141    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/TimeMeasure/Measure.php

    r894 r899  
    1212  public array $ValueTypes = array('Min', 'Avg', 'Max');
    1313
    14   static function GetDesc(): ModelDesc
     14  static function GetModelDesc(): ModelDesc
    1515  {
    1616    $Desc = new ModelDesc(self::GetClassName());
     
    329329    }
    330330    // array_pop($Values);
    331     //  echo('abc');
    332     //  die();
    333331    if ($this->Debug) echo('Item count: '.count($Values));
    334332
  • trunk/Modules/TimeMeasure/TimeMeasure.php

    r894 r899  
    55include_once(dirname(__FILE__).'/Main.php');
    66
    7 class ModuleTimeMeasure extends AppModule
     7class ModuleTimeMeasure extends Module
    88{
    99  function __construct(System $System)
     
    1515    $this->License = 'GNU/GPLv3';
    1616    $this->Description = 'Time measure of custom values, char';
    17     $this->Dependencies = array('User');
    18   }
    19 
    20   function GetModels(): array
    21   {
    22     return array(Measure::GetClassName());
     17    $this->Dependencies = array(ModuleUser::GetName());
     18    $this->Models = array(Measure::GetClassName());
    2319  }
    2420
  • trunk/Modules/User/User.php

    r896 r899  
    55include_once(dirname(__FILE__).'/UserPage.php');
    66
    7 class ModuleUser extends AppModule
     7class ModuleUser extends Module
    88{
    99  public array $UserPanel;
     
    1818    $this->License = 'GNU/GPLv3';
    1919    $this->Description = 'User management';
    20     $this->Dependencies = array();
     20    $this->Models = array(User::GetClassName(), UserOnline::GetClassName(), PermissionGroup::GetClassName(), PermissionOperation::GetClassName(),
     21      PermissionGroupAssignment::GetClassName(), PermissionUserAssignment::GetClassName());
     22
    2123    $this->UserPanel = array();
    2224    $this->User = new User($System);
    23   }
    24 
    25   function GetModels(): array
    26   {
    27     return array(User::GetClassName(), UserOnline::GetClassName(), PermissionGroup::GetClassName(), PermissionOperation::GetClassName(),
    28       PermissionGroupAssignment::GetClassName(), PermissionUserAssignment::GetClassName());
    2925  }
    3026
     
    208204  }
    209205
    210   static function Cast(AppModule $AppModule): ModuleUser
    211   {
    212     if ($AppModule instanceof ModuleUser)
     206  static function Cast(Module $Module): ModuleUser
     207  {
     208    if ($Module instanceof ModuleUser)
    213209    {
    214       return $AppModule;
     210      return $Module;
    215211    }
    216     throw new Exception('Expected ModuleUser type but got '.gettype($AppModule));
     212    throw new Exception('Expected ModuleUser type but got '.gettype($Module));
    217213  }
    218214}
  • trunk/Modules/User/UserModel.php

    r897 r899  
    6565  }
    6666
    67   static function GetDesc(): ModelDesc
     67  static function GetModelDesc(): ModelDesc
    6868  {
    6969    $Desc = new ModelDesc(self::GetClassName());
     
    461461class UserOnline extends Model
    462462{
    463   static function GetDesc(): ModelDesc
     463  static function GetModelDesc(): ModelDesc
    464464  {
    465465    $Desc = new ModelDesc(self::GetClassName());
     
    480480class PermissionGroup extends Model
    481481{
    482   static function GetDesc(): ModelDesc
     482  static function GetModelDesc(): ModelDesc
    483483  {
    484484    $Desc = new ModelDesc(self::GetClassName());
     
    490490class PermissionGroupAssignment extends Model
    491491{
    492   static function GetDesc(): ModelDesc
     492  static function GetModelDesc(): ModelDesc
    493493  {
    494494    $Desc = new ModelDesc(self::GetClassName());
     
    502502class PermissionOperation extends Model
    503503{
    504   static function GetDesc(): ModelDesc
     504  static function GetModelDesc(): ModelDesc
    505505  {
    506506    $Desc = new ModelDesc(self::GetClassName());
     
    516516class PermissionUserAssignment extends Model
    517517{
    518   static function GetDesc(): ModelDesc
     518  static function GetModelDesc(): ModelDesc
    519519  {
    520520    $Desc = new ModelDesc(self::GetClassName());
  • trunk/Modules/VPS/VPS.php

    r887 r899  
    11<?php
    22
    3 class ModuleVPS extends AppModule
     3class ModuleVPS extends Module
    44{
    55  function __construct(System $System)
     
    1010    $this->Version = '1.0';
    1111    $this->Creator = 'Chronos';
    12     $this->License = 'GNU/GPL';
     12    $this->License = 'GNU/GPLv3';
    1313    $this->Description = 'VPS(Virtual Private Server) hosting management';
    14     $this->Dependencies = array('User', 'Network', 'Subject');
    15     $this->Modules = array();
    16   }
    17 
    18   function DoStart(): void
    19   {
    20 
    21   }
    22 
    23   function DoInstall(): void
    24   {
    25 
     14    $this->Dependencies = array(ModuleUser::GetName(), ModuleNetwork::GetName(), ModuleSubject::GetName());
    2615  }
    2716}
  • trunk/Modules/WebCam/WebCam.php

    r887 r899  
    4848}
    4949
    50 class ModuleWebCam extends AppModule
     50class ModuleWebCam extends Module
    5151{
    5252  public string $ImageFileName = 'webcam.jpg';
     
    5858    $this->Version = '1.0';
    5959    $this->Creator = 'Chronos';
    60     $this->License = 'GNU/GPL';
     60    $this->License = 'GNU/GPLv3';
    6161    $this->Description = 'Web camera image presentetation';
    62     $this->Dependencies = array();
    63     $this->SupportedModels = array();
    6462  }
    6563
     
    8179  }
    8280
    83   static function Cast(AppModule $AppModule): ModuleWebCam
     81  static function Cast(Module $Module): ModuleWebCam
    8482  {
    85     if ($AppModule instanceof ModuleWebCam)
     83    if ($Module instanceof ModuleWebCam)
    8684    {
    87       return $AppModule;
     85      return $Module;
    8886    }
    89     throw new Exception('Expected ModuleWebCam type but got '.gettype($AppModule));
     87    throw new Exception('Expected ModuleWebCam type but got '.gettype($Module));
    9088  }
    9189}
  • trunk/Modules/Wiki/Wiki.php

    r897 r899  
    11<?php
    22
    3 class ModuleWiki extends AppModule
     3class ModuleWiki extends Module
    44{
    55  function __construct(System $System)
     
    1111    $this->License = 'GNU/GPLv3';
    1212    $this->Description = 'Mediawiki style page management';
    13     $this->Dependencies = array('User');
    14     $this->Revision = 1;
    15   }
    16 
    17   function GetModels(): array
    18   {
    19     return array(WikiPage::GetClassName(), WikiPageContent::GetClassName());
     13    $this->Dependencies = array(ModuleUser::GetName());
     14    $this->Models = array(WikiPage::GetClassName(), WikiPageContent::GetClassName());
    2015  }
    2116
     
    4439class WikiPage extends Model
    4540{
    46   static function GetDesc(): ModelDesc
     41  static function GetModelDesc(): ModelDesc
    4742  {
    4843    $Desc = new ModelDesc(self::GetClassName());
     
    5651class WikiPageContent extends Model
    5752{
    58   static function GetDesc(): ModelDesc
     53  static function GetModelDesc(): ModelDesc
    5954  {
    6055    $Desc = new ModelDesc(self::GetClassName());
Note: See TracChangeset for help on using the changeset viewer.