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

Legend:

Unmodified
Added
Removed
  • 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());
Note: See TracChangeset for help on using the changeset viewer.