From 21c3c498c8c163fea57f36afc1027ab17188740d Mon Sep 17 00:00:00 2001 From: Celestora Date: Sat, 9 Oct 2021 22:18:59 +0300 Subject: [PATCH] Add quirk configuration --- bootstrap.php | 7 +++++++ quirks.yml | 0 2 files changed, 7 insertions(+) create mode 100644 quirks.yml diff --git a/bootstrap.php b/bootstrap.php index dcce4f95..7161fd9b 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -46,6 +46,13 @@ function _ovk_check_environment(): void } } +function ovkGetQuirk(string $quirk): int +{ + static $quirks = chandler_parse_yaml(__DIR__ . "/quirks.yml"); + + return isset($v = $quirks[$quirk]) ? (int) $v : 0; +} + function ovk_proc_strtr(string $string, int $length = 0): string { $newString = iconv_substr($string, 0, $length); diff --git a/quirks.yml b/quirks.yml new file mode 100644 index 00000000..e69de29b