Ignore:
Timestamp:
Jan 12, 2021, 10:29:50 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Setup is now AppModule and it is installed and stated as first module.
  • Modified: Improved modular system.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/Core.php

    r887 r895  
    2222  public string $RootURLFolder;
    2323  public bool $ShowPage;
    24   public Setup $Setup;
    2524  public array $PageHeaders;
    2625  public BaseView $BaseView;
     
    7877  }
    7978
    80   function AddModule($Module): void
    81   {
    82     $this->ModuleManager->Modules[get_class($Module)] = $Module;
    83   }
    84 
    8579  function HumanDate(int $Time): string
    8680  {
     
    131125    $this->Config = &$Config;
    132126
    133     try {
     127    try
     128    {
    134129      $this->Database->Connect($this->Config['Database']['Host'], $this->Config['Database']['User'],
    135130        $this->Config['Database']['Password'], $this->Config['Database']['Database']);
     
    140135      if (isset($this->Config['Web']['LogSQLQuery']))
    141136        $this->Database->LogSQLQuery = $this->Config['Web']['LogSQLQuery'];
    142     } catch (Exception $E) {
     137    } catch (Exception $E)
     138    {
    143139      //$Output .= 'Nelze se připojit k databázi.';
    144140    }
     
    162158    RegisterFormClasses($this->FormManager);
    163159
    164     // Register and start existing modules
    165     $this->Setup = new Setup($this);
    166     $this->Setup->Start();
    167     if ($this->Setup->CheckState())
    168     {
    169       $this->ModuleManager->Start();
    170     }
     160    $this->ModuleManager->Start();
    171161  }
    172162
Note: See TracChangeset for help on using the changeset viewer.