Changeset 779


Ignore:
Timestamp:
Jan 6, 2016, 11:01:30 PM (9 years ago)
Author:
chronos
Message:
  • Moved: Application, Base and AppModule to Common Package.
  • Modified: Main application class renamed to Core.
Location:
trunk
Files:
1 added
1 deleted
5 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/Application/System.php

    r747 r779  
    44if(file_exists($ConfigFileName)) include_once($ConfigFileName);
    55
    6 include_once(dirname(__FILE__).'/../Common/Application.php');
    76include_once(dirname(__FILE__).'/Version.php');
    87include_once(dirname(__FILE__).'/../Common/Global.php');
    98include_once(dirname(__FILE__).'/FormClasses.php');
    109
    11 class System extends Application
     10class Core extends Application
    1211{
    13   /** @var Database */
    14   var $Database;
    15   var $Modules;
    1612  /** @var Type */
    1713  var $Type;
    1814  var $Pages;
    1915  var $Bars;
    20   /** @var AppModuleManager */
    21   var $ModuleManager;
    2216  /** @var FormManager */
    2317  var $FormManager;
     
    3226  function __construct()
    3327  {
     28    parent::__construct();
    3429    $this->Modules = array();
    3530    $this->Pages = array();
    36     $this->ModuleManager = new AppModuleManager($this);
    3731    $this->ModuleManager->FileName = dirname(__FILE__).'/../Config/ModulesConfig.php';
    38     $this->Database = new Database();
    3932    $this->FormManager = new FormManager($this->Database);
    4033    $this->ShowPage = true;
  • trunk/Common/Global.php

    r746 r779  
    66$Database = NULL;
    77
    8 include_once(dirname(__FILE__).'/Base.php');
    9 include_once(dirname(__FILE__).'/AppModule.php');
     8include_once(dirname(__FILE__).'/../Packages/Package.php');
     9include_once(dirname(__FILE__).'/../Packages/Common/Common.php');
    1010include_once(dirname(__FILE__).'/Page.php');
    1111include_once(dirname(__FILE__).'/Table.php');
     
    1313include_once(dirname(__FILE__).'/Config.php');
    1414include_once(dirname(__FILE__).'/Setup/Setup.php');
    15 include_once(dirname(__FILE__).'/../Packages/Package.php');
    16 include_once(dirname(__FILE__).'/../Packages/Common/Common.php');
    1715include_once(dirname(__FILE__).'/VCL/General.php');
    1816include_once(dirname(__FILE__).'/VCL/Database.php');
  • trunk/Packages/Common/AppModule.php

    r778 r779  
    190190  var $System;
    191191  var $FileName;
     192  var $ModulesDir;
    192193  var $OnLoadModules;
    193194
     
    197198    $this->System = &$System;
    198199    $this->FileName = 'Config/Modules.php';
     200    $this->ModulesDir = dirname(__FILE__).'/../../Modules';
    199201  }
    200202
     
    364366    if(method_exists($this->OnLoadModules[0], $this->OnLoadModules[1]))
    365367      $this->OnLoadModules();
    366     else $this->LoadModulesFromDir(dirname(__FILE__).'/../Modules');
    367   }
    368 }
     368    else $this->LoadModulesFromDir($this->ModulesDir);
     369  }
     370}
  • trunk/Packages/Common/Base.php

    r778 r779  
    11<?php
     2
     3class System
     4{
     5  /* @var Database */
     6  var $Database;
     7
     8  function __construct()
     9  {
     10    $this->Database = new Database();
     11  }
     12}
    213
    314class Base
    415{
    5   /** @var Database */
     16  /** @var Application */
     17  var $System;
     18  /* @var Database */
    619  var $Database;
    7   /** @var System */
    8   var $System;
    920
    10   function __construct($System)
     21  function __construct(Application $System)
    1122  {
    1223    $this->System = &$System;
  • trunk/Packages/Common/Common.php

    r746 r779  
    99include_once(dirname(__FILE__).'/UTF8.php');
    1010include_once(dirname(__FILE__).'/VarDumper.php');
    11 
     11include_once(dirname(__FILE__).'/Base.php');
     12include_once(dirname(__FILE__).'/Application.php');
     13include_once(dirname(__FILE__).'/AppModule.php');
    1214
    1315class PackageCommon extends Package
  • trunk/cmd.php

    r729 r779  
    33include_once('Application/System.php');
    44
    5 $System = new System();
     5$System = new Core();
    66$System->RunCommandLine();
  • trunk/index.php

    r592 r779  
    33include_once('Application/System.php');
    44
    5 $System = new System();
     5$System = new Core();
    66$System->Run();
Note: See TracChangeset for help on using the changeset viewer.