Ignore:
Timestamp:
Nov 20, 2020, 12:08:12 AM (3 years ago)
Author:
chronos
Message:
  • Added: Static types added to almost all classes, methods and function. Supported by PHP 7.4.
  • Fixed: Various found code issues.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/View.php

    r874 r887  
    66{
    77  var $TimeStart;
    8   var $FormatHTML = false;
    9   var $ShowRuntimeInfo = false;
    10   var $ClearPage = false;
    11   var $BasicHTML = false;
    12   var $ParentClass = '';
    13   var $ShortTitle;
    14   var $FullTitle;
    15   var $Encoding;
    16   var $Style;
     8  public bool $FormatHTML = false;
     9  public bool $ShowRuntimeInfo = false;
     10  public bool $ClearPage = false;
     11  public bool $BasicHTML = false;
     12  public string $ParentClass = '';
     13  public string $ShortTitle;
     14  public string $FullTitle;
     15  public string $Encoding;
     16  public string $Style;
    1717
    18   function __construct($System)
     18  function __construct(System $System)
    1919  {
    2020    parent::__construct($System);
     
    3636  }
    3737
    38   function SystemMessage($Title, $Text)
     38  function SystemMessage(string $Title, string $Text): string
    3939  {
    4040    return '<table align="center"><tr><td><div class="SystemMessage"><h3>'.$Title.'</h3><div>'.$Text.'</div></div></td></tr></table>';
     
    4343  }
    4444
    45   function ShowNavigation($Page)
     45  function ShowNavigation(Page $Page): string
    4646  {
    4747    if (array_key_exists('REQUEST_URI', $_SERVER))
     
    7171  }
    7272
    73   function ShowHeader($Page)
     73  function ShowHeader(Page $Page): string
    7474  {
    7575    $Title = $Page->FullTitle;
     
    109109  }
    110110
    111   function ShowFooter()
     111  function ShowFooter(): string
    112112  {
    113113    global $ScriptTimeStart, $Revision, $ReleaseTime;
     
    128128  }
    129129
    130   function GetOutput($Page)
     130  function GetOutput(Page $Page): string
    131131  {
    132132    $Page->OnSystemMessage = array($this->System->BaseView, 'SystemMessage');
     
    141141  }
    142142
    143   function NewPage($ClassName)
     143  function NewPage(string $ClassName): Page
    144144  {
    145145    $Page = new $ClassName();
     
    151151
    152152  // XML formating function
    153   function FormatOutput($s)
     153  function FormatOutput(string $s): string
    154154  {
    155155    $out = '';
Note: See TracChangeset for help on using the changeset viewer.