@throws Exchange1CException

@return string
490135
public function checkAuth()
    {
        if (
            $this->request->server->get('PHP_AUTH_USER') === $this->config->getLogin() &&
            $this->request->server->get('PHP_AUTH_PW') === $this->config->getPassword()
        ) {
            $this->session->save();
            $response = "success\n";
            $response .= "laravel_session\n";
            $response .= $this->session->getId()."\n";
            $response .= 'timestamp='.time();
            if ($this->session instanceof SessionInterface) {
                $this->session->set(self::SESSION_KEY.'_auth', $this->config->getLogin());
            } elseif ($this->session instanceof Session) {
                $this->session->put(self::SESSION_KEY.'_auth', $this->config->getLogin());
            } else {
                throw new Exchange1CException(sprintf('Session is not insatiable interface %s or %s', SessionInterface::class, Session::class));
            }
        } else {
            $response = "failure\n";
        }

        return $response;
    }
355553
public function getClientFirstMessage()
    {
        /* n: client doesn't support channel binding,
         * <empty>,
         * n=<user>: SASLprepped username with "," and "=" escaped,
         * r=<nonce>: Random nonce */
        $this->_authmsg = 'n=' . str_replace(
            array(',', '='),
            array('=2C', '=3D'),
            $this->_user
        ) . ',r=' . $this->_nonce;

        return 'n,,' . $this->_authmsg;
    }
480452
protected function getExports()
	{
		if (empty($this->exports))
		{
			return '';
		}

		$exports = [];
		foreach ($this->exports as $export)
		{
			$exports[] = "'" . $export . "':" . $export;
		}
		sort($exports);

		return "window['s9e']['TextFormatter'] = {" . implode(',', $exports) . '}';
	}
943317
protected function getEmailOriginMessage()
    {
        $lang = \OxidEsales\Eshop\Core\Registry::getLang();
        $shopUrl = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('sShopURL');

        return "<br>" . sprintf(
            $lang->translateString(
                'SHOP_EMAIL_ORIGIN_MESSAGE',
                null,
                true
            ),
            $shopUrl
        );
    }
966178
public function getFirstError(): string
    {
        $result = '';
        $errors = $this->getErrors();
        $firstField = reset($errors);

        if ($firstField && isset($firstField[0])) {
            $result = $firstField[0];
        }

        return $result;
    }
776767
public function getEmailSubject() : string
    {
        $result = sprintf(
            '%s: %s',
            Inflector::singularize($this->table->getAlias()),
            $this->getDisplayValue()
        );

        if (! $this->entity->isNew()) {
            $result = sprintf('(Updated) %s', $result);
        }

        return $result;
    }
420303
public function get_sha1() {
        $file = '';
        if ($this->multifiles) {
            $file = $this->get_sha1_file();
        }
        return sha1(serialize($this->exportdata) . $file);
    }
824781
public function getExchange()
    {
        if (!$this->exchange)
        {
            $this->exchange = $this->doctrine->getRepository('HarvestCloudCoreBundle:Exchange')->find(1);
        }

        return $this->exchange;
    }
647334
@SuppressWarnings("rawtypes")
    protected Form getForm(HttpServerExchange exchange) throws IOException {
        final Form form = Application.getInstance(Form.class);
        if (RequestUtils.isPostPutPatch(exchange)) {
            final Builder builder = FormParserFactory.builder();
            builder.setDefaultCharset(StandardCharsets.UTF_8.name());
            try (final FormDataParser formDataParser = builder.build().createParser(exchange)) {
                if (formDataParser != null) {
                    exchange.startBlocking();
                    final FormData formData = formDataParser.parseBlocking();
                    for (String data : formData) {
                        Deque<FormValue> deque = formData.get(data);
                        if (deque != null) {
                            FormValue formValue = deque.element();
                            if (formValue != null) {
                                if (formValue.isFileItem() && formValue.getFileItem().getFile() != null) {
                                    form.addFile(Files.newInputStream(formValue.getFileItem().getFile()));
                                } else {
                                    if (data.contains("[]")) {
                                        String key = StringUtils.replace(data, "[]", "");
                                        for (Iterator iterator = deque.iterator(); iterator.hasNext();)  {
                                            form.addValueList(new HttpString(key).toString(), ((FormValue) iterator.next()).getValue());
                                        }
                                    } else {
                                        form.addValue(new HttpString(data).toString(), formValue.getValue());
                                    }
                                }    
                            }
                        }
                    }
                }
            }
            
            form.setSubmitted(true);
        }

        return form;
    }
510923
private function produceExchangeInstance($exchangeName)
    {
        if (isset($this->declaredExchangeInstances[$exchangeName])) {
            return $this->declaredExchangeInstances[$exchangeName];
        }

        if (isset($this->usedExchangeInstances[$exchangeName])) {
            return $this->usedExchangeInstances[$exchangeName];
        }

        $this->ensureChannel();
        $exchange = new AMQPExchange($this->channel);
        $exchange->setName($exchangeName);
        $this->usedExchangeInstances[$exchangeName] = $exchange;
        return $exchange;
    }
533763
public function getAutodiscoverRequest()
    {
        if (!empty($this->requestxml)) {
            return $this->requestxml;
        }

        $xml = new \XMLWriter();
        $xml->openMemory();
        $xml->setIndent(true);
        $xml->startDocument('1.0', 'UTF-8');
        $xml->startElementNS(
            null,
            'Autodiscover',
            'http://schemas.microsoft.com/exchange/autodiscover/outlook/requestschema/2006'
        );

        $xml->startElement('Request');
        $xml->writeElement('EMailAddress', $this->email);
        $xml->writeElement(
            'AcceptableResponseSchema',
            'http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a'
        );
        $xml->endElement();
        $xml->endElement();

        $this->requestxml = $xml->outputMemory();
        return $this->requestxml;
    }
470996
public function getOrigin(): string
    {
        $requestOrigin = $this->request->getOrigin();
        $hasWildcard = in_array('*', $this->origins);

        // The origin is seted "*"?
        if ($hasWildcard && !$requestOrigin) {
            return '*';
        }

        // Get request heaer origin line.
        // If the request origin in config
        // to be origins return the request origin value.
        if (in_array($requestOrigin, $this->origins) || $hasWildcard) {
            return $requestOrigin;
        }

        // Return empty.
        return '';
    }
1349983
protected function GetXMLSettlement()
    {
        $oShopBasket = TShopBasket::GetInstance();
        $sMerchantId = $this->GetTestLiveModeParameter('merchantId');
        $sRefNo = $this->GetRefNoParameter(false);
        $sCurrency = $this->GetCurrencyIdentifier();
        $oLocal = &TCMSLocal::GetActive();
        $sAmount = str_replace(',', '.', $oLocal->FormatNumber($oShopBasket->dCostTotal)) * 100;
        $sXML = '<?xml version="1.0" encoding="UTF-8" ?>
       <paymentService version="1">
         <body merchantId="'.$this->GetTestLiveModeParameter('merchantId').'">
           <transaction refno="'.$sRefNo.'">
             <request>
               <amount>'.$sAmount.'</amount>
               <currency>'.$sCurrency.'</currency>
               <uppTransactionId>'.$this->sTransactionId.'</uppTransactionId>
               <transtype>'.self::PAYMENT_CREDIT_CARD_TRANS_TYPE_ID.'</transtype>
               <sign>'.$this->GetSecurityHash($this->GetTestLiveModeParameter('sign'), $sMerchantId, $sAmount, $sCurrency, $sRefNo).'</sign>
             </request>
           </transaction>
         </body>
       </paymentService>';

        return $sXML;
    }
164120
public function getCsz()
    {
        $str = $this->city;
        if (!empty($this->subnational_division)) {
            $str .= ", " . $this->subnational_division;
        }
        if (!empty($this->postal_code)) {
            $str .= " " . $this->postal_code;
        }

        return $str;
    }
705607
public function getImporterXsd(): string
    {
        $xsd = new \DOMDocument('1.0', 'utf-8');
        $xsd->loadXML('<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"/>');
        foreach ($this->schemas as $schema) {
            $node = $xsd->createElementNS('http://www.w3.org/2001/XMLSchema', 'import');
            $node->setAttribute('namespace', $schema->getNamespace());
            $node->setAttribute('schemaLocation', str_replace('\\', '/', $schema->getLocation()));
            $xsd->documentElement->appendChild($node);
        }
        return $xsd->saveXML();
    }
966975
public void process(final Exchange exchange) throws Exception {
        final Message in = exchange.getIn();

        final String contentType = in.getHeader(CONTENT_TYPE, "", String.class);
        final String body = in.getBody(String.class);
        final Set<String> endpoints = new HashSet<>();

        for (final String s : in.getHeader(REINDEXING_RECIPIENTS, "", String.class).split(",")) {
            endpoints.add(s.trim());
        }

        if (contentType.equals("application/json") && body != null && !body.trim().isEmpty()) {
            try {
                final JsonNode root = MAPPER.readTree(body);
                final Iterator<JsonNode> ite = root.elements();
                while (ite.hasNext()) {
                    final JsonNode n = ite.next();
                    endpoints.add(n.asText());
                }
            } catch (JsonProcessingException e) {
                LOGGER.debug("Invalid JSON", e);
                in.setHeader(HTTP_RESPONSE_CODE, BAD_REQUEST);
                in.setBody("Invalid JSON");
            }
        }
        in.setHeader(REINDEXING_RECIPIENTS, join(",", endpoints));
    }
330544
public function getSupportContactForm()
    {
        $aLinks = [
            "de" => "https://www.oxid-esales.com/oxid-welt/support/supportanfrage/",
            "en" => "https://www.oxid-esales.com/en/oxid-world/support/support-offer/"
        ];

        $oLang = Registry::getLang();
        $aLanguages = $oLang->getLanguageArray();
        $iLangId = $oLang->getTplLanguage();
        $sLangCode = $aLanguages[$iLangId]->abbr;

        if (!array_key_exists($sLangCode, $aLinks)) {
            $sLangCode = "de";
        }

        return $aLinks[$sLangCode];
    }