protected static function getCurrentPath(RequestApplicationInterface $app, $onlyStaticPart = false) {
        $route = $app->getRoute();
        return $route ? $route->getRoutePath($onlyStaticPart) : null;
    }