Changeset 899 for trunk/Modules/NetworkConfig/NetworkConfig.php
- Timestamp:
- Feb 17, 2021, 12:30:23 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/NetworkConfig/NetworkConfig.php
r894 r899 1 1 <?php 2 2 3 class ModuleNetworkConfig extends AppModule3 class ModuleNetworkConfig extends Module 4 4 { 5 5 public array $ConfigItems; … … 11 11 $this->Version = '1.0'; 12 12 $this->Creator = 'Chronos'; 13 $this->License = 'GNU/GPL ';13 $this->License = 'GNU/GPLv3'; 14 14 $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 16 18 $this->ConfigItems = array(); 17 }18 19 function GetModels(): array20 {21 return array(NetworkConfigurationLog::GetClassName(), NetworkConfiguration::GetClassName());22 19 } 23 20 … … 90 87 } 91 88 92 static function Cast( AppModule $AppModule): ModuleNetworkConfig89 static function Cast(Module $Module): ModuleNetworkConfig 93 90 { 94 if ($ AppModule instanceof ModuleNetworkConfig)91 if ($Module instanceof ModuleNetworkConfig) 95 92 { 96 return $ AppModule;93 return $Module; 97 94 } 98 throw new Exception('Expected ModuleNetworkConfig type but got '.gettype($ AppModule));95 throw new Exception('Expected ModuleNetworkConfig type but got '.gettype($Module)); 99 96 } 100 97 } … … 109 106 class NetworkConfiguration extends Model 110 107 { 111 static function Get Desc(): ModelDesc108 static function GetModelDesc(): ModelDesc 112 109 { 113 110 $Desc = new ModelDesc(self::GetClassName()); … … 125 122 class NetworkConfigurationLog extends Model 126 123 { 127 static function Get Desc(): ModelDesc124 static function GetModelDesc(): ModelDesc 128 125 { 129 126 $Desc = new ModelDesc(self::GetClassName());
Note:
See TracChangeset
for help on using the changeset viewer.