diff options
Diffstat (limited to 'classes/Handler.php')
-rw-r--r-- | classes/Handler.php | 35 |
1 files changed, 35 insertions, 0 deletions
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 @@ +<?php +class Handler implements IHandler { + protected PDO $pdo; + + /** @var array<int|string, mixed> */ + protected array $args; + + /** + * @param array<int|string, mixed> $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"); + } +} |