From 865ecc87963dc3b26e66296616eef2a1cc41ac3f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 25 Oct 2023 12:55:09 +0300 Subject: move to psr-4 autoloader --- classes/Handler.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 classes/Handler.php (limited to 'classes/Handler.php') diff --git a/classes/Handler.php b/classes/Handler.php new file mode 100644 index 000000000..5b54570d8 --- /dev/null +++ b/classes/Handler.php @@ -0,0 +1,35 @@ + */ + protected array $args; + + /** + * @param array $args + */ + function __construct(array $args) { + $this->pdo = Db::pdo(); + $this->args = $args; + } + + function csrf_ignore(string $method): bool { + return false; + } + + function before(string $method): bool { + return true; + } + + function after(): bool { + return true; + } + + /** + * @param mixed $p + */ + protected static function _param_to_bool($p): bool { + $p = clean($p); + return $p && ($p !== "f" && $p !== "false"); + } +} -- cgit v1.2.3