source: trunk/Packages/Common/ModelDef.php

Last change on this file was 8, checked in by chronos, 18 months ago
  • Modified: Updated Common package.
  • Modified: Form types made as separate FormManager package.
  • Fixed: PHP 8.1 support.
File size: 491 bytes
Line 
1<?php
2
3class ModelDef
4{
5 public array $OnChange;
6 public string $Title;
7
8 function __construct()
9 {
10 $this->OnChange = array();
11 }
12
13 function DoOnChange(): void
14 {
15 foreach ($this->OnChange as $Callback)
16 {
17 call_user_func($Callback);
18 }
19 }
20
21 function RegisterOnChange(string $SysName, callable $Callback): void
22 {
23 $this->OnChange[$SysName] = $Callback;
24 }
25
26 function UnregisterOnChange(string $SysName): void
27 {
28 unset($this->OnChange[$SysName]);
29 }
30}
Note: See TracBrowser for help on using the repository browser.