first commit

This commit is contained in:
2026-04-24 15:32:21 +02:00
commit 20d40fead4
5046 changed files with 641038 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<?php
/*
* Wymiana danych w kontrolerze modułowym
*/
class ControllerDataExchange {
public static function Get($variable) {
$index = self::Init();
if(isset($index[$variable])) {
return $index[$variable];
} else {
throw new UserException('Niezdefiniowana zmienna: '.$variable.' w indeksie ControllerDataExchange');
}
}
public static function Exists($variable) {
$index = self::Init();
if(isset($index[$variable])) {
return true;
} else {
return false;
}
}
public static function Set($variable, $value) {
$index = self::Init();
$index[$variable] = $value;
self::Save($index);
}
private static function Init() {
if(Registry::Exists('ControllerDataExchange')) {
return Registry::Get('ControllerDataExchange');
} else {
return array();
}
}
private static function Save($index) {
if(Registry::Exists('ControllerDataExchange')) {
return Registry::Remove('ControllerDataExchange');
}
Registry::Set('ControllerDataExchange', $index);
}
}
?>