Ignore:
Timestamp:
Aug 3, 2021, 11:20:41 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Used explicit types where possible for better error reporting.
  • Modified: Updated Common packaged to newer version.
  • Modified: Simplified pages title.
  • Added: Simple keyword based spam filter for meet items.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        1 nbproject
        2 Config.php
        31.settings
        42.project
        53.buildpath
         4.htaccess
  • trunk/Packages/Common/Config.php

    r55 r63  
    33class Config
    44{
    5   var $Data;
     5  public array $Data;
    66
    77  function __construct()
     
    1010  }
    1111
    12   function ReadValue($Name)
     12  function ReadValue(string $Name)
    1313  {
    1414    if (!is_array($Name)) $Name = explode('/', $Name);
     
    2222  }
    2323
    24   function WriteValue($Name, $Value)
     24  function WriteValue(string $Name, $Value)
    2525  {
    2626    if (!is_array($Name)) $Name = explode('/', $Name);
     
    3434  }
    3535
    36   function LoadFromFile($FileName)
     36  function LoadFromFile(string $FileName): void
    3737  {
    3838    $ConfigData = array();
     
    4040    foreach ($this->Data as $Index => $Item)
    4141    {
    42       if (array_key_exits($Index, $ConfigData))
     42      if (array_key_exists($Index, $ConfigData))
    4343        $this->Data[$Index] = $ConfigData[$Index];
    4444    }
    4545  }
    4646
    47   function SaveToFile($FileName)
     47  function SaveToFile(string $FileName): void
    4848  {
    4949    file_put_contents($FileName, "<?php \n\n\$ConfigData = ".var_export($this->Data, true).";\n");
    5050  }
    5151
    52   function GetAsArray()
     52  function GetAsArray(): array
    5353  {
    5454    return $this->Data;
Note: See TracChangeset for help on using the changeset viewer.