. */ declare(strict_types=1); namespace FireflyIII\Support\Binder; use Illuminate\Routing\Route; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Class DynamicConfigKey */ class DynamicConfigKey { public static array $accepted = [ 'configuration.is_demo_site', 'configuration.permission_update_check', 'configuration.single_user_mode', 'configuration.last_update_check', ]; /** * @param string $value * @param Route $route * * @return string * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ public static function routeBinder(string $value, Route $route): string { if (in_array($value, self::$accepted, true)) { return $value; } throw new NotFoundHttpException; } }