Ignore:
Timestamp:
Dec 6, 2021, 11:33:48 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Added: Explicit types for better type checking.
  • Fixed: Support for php 8.0.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Base.php

    r94 r95  
    11<?php
    2 
    3 class System
    4 {
    5   /* @var Database */
    6   var $Database;
    7 
    8   function __construct()
    9   {
    10     $this->Database = new Database();
    11   }
    12 }
    132
    143class Base
    154{
    16   /** @var Application */
    17   var $System;
    18   /* @var Database */
    19   var $Database;
     5  public System $System;
     6  public Database $Database;
    207
    21   function __construct(Application $System)
     8  function __construct(System $System)
    229  {
    23     $this->System = $System;
    24     $this->Database = $System->Database;
     10    $this->System = &$System;
     11    $this->Database = &$System->Database;
     12  }
     13
     14  static function GetClassName()
     15  {
     16    return get_called_class();
    2517  }
    2618}
    27 
    28 class Model extends Base
    29 {
    30 
    31 }
    32 
    33 class View extends Base
    34 {
    35 
    36 }
    37 
    38 class Controller extends Base
    39 {
    40 
    41 }
Note: See TracChangeset for help on using the changeset viewer.