You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
420 B
PHTML
27 lines
420 B
PHTML
5 years ago
|
<?php
|
||
|
namespace Base\Tool;
|
||
|
|
||
|
class Registry
|
||
|
{
|
||
|
public static $data;
|
||
|
|
||
|
public static function get(string $name)
|
||
|
{
|
||
|
return self::$data[$name] ?? null;
|
||
|
}
|
||
|
|
||
|
public static function set(string $name, $value)
|
||
|
{
|
||
|
self::$data[$name] = $value;
|
||
|
}
|
||
|
|
||
|
public static function has($name)
|
||
|
{
|
||
|
return isset(self::$data[$name]);
|
||
|
}
|
||
|
|
||
|
public static function delete($name)
|
||
|
{
|
||
|
unset(self::$data[$name]);
|
||
|
}
|
||
|
}
|