private function parseRequest(Request $request)
    {
        $query = $request->query;

        $path = $query->get('path');
        $hidden = (int)$query->get('hidden', 0);
        $image = $query->get('image');
        $siteAccess = $query->get('siteaccess');
        $webHook = $query->get('webHook');
        $transaction = $query->get('transaction');
        $fields = $query->get('fields');
        $customerId = $query->get('customerId');
        $licenseKey = $query->get('licenseKey');

        if (preg_match('/^\/\d+(?:\/\d+)*\/$/', $path) !== 1) {
            $path = null;
        }

        if (preg_match('/^[a-zA-Z0-9\-\_]+$/', $image) !== 1) {
            $image = null;
        }

        if (preg_match('/^[a-zA-Z0-9_-]+$/', $siteAccess) !== 1) {
            $siteAccess = null;
        }

        if (preg_match('/((http|https)\:\/\/)?[a-zA-Z0-9\.\/\?\:@\-_=#]+\.([a-zA-Z0-9\&\.\/\?\:@\-_=#])*/', $webHook) !== 1) {
            $webHook = null;
        }

        if (preg_match('/^[0-9]+$/', $transaction) !== 1) {
            $transaction = (new \DateTime())->format('YmdHisv');
        }

        if (preg_match('/^[a-zA-Z0-9\-\_\,]+$/', $fields) !== 1) {
            $fields = null;
        }

        if (preg_match('/^[a-zA-Z0-9_-]+$/', $customerId) !== 1) {
            $customerId = null;
        }

        if (preg_match('/^[a-zA-Z0-9_-]+$/', $licenseKey) !== 1) {
            $licenseKey = null;
        }

        return array(
            'pageSize' => (int)$query->get('pageSize', null),
            'page' => (int)$query->get('page', 1),
            'path' => $path,
            'hidden' => $hidden,
            'image' => $image,
            'siteaccess' => $siteAccess,
            'documentRoot' => $request->server->get('DOCUMENT_ROOT'),
            'host' => $request->getSchemeAndHttpHost(),
            'webHook' => $webHook,
            'transaction' => $transaction,
            'lang' => preg_replace('/[^a-zA-Z0-9_-]+/', '', $query->get('lang')),
            'fields' => $fields,
            'mandatorId' => (int)$query->get('mandatorId', 0),
            'customerId' => $customerId,
            'licenseKey' => $licenseKey,
        );
    }