Your IP : 216.73.216.97


Current Path : /var/www/clients/client3/web2/web/vendor/klarna/module-core/etc/
Upload File :
Current File : /var/www/clients/client3/web2/web/vendor/klarna/module-core/etc/di.xml

<?xml version="1.0"?>
<!--
/**
 * This file is part of the Klarna Core module
 *
 * (c) Klarna Bank AB (publ)
 *
 * For the full copyright and license information, please view the NOTICE
 * and LICENSE files that were distributed with this source code.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <!-- Custom config reader -->
    <virtualType name="Klarna\Core\Config\Virtual"
                 type="Magento\Framework\Config\Data">
        <arguments>
            <argument name="reader" xsi:type="object">Klarna\Core\Config\Reader\Virtual</argument>
            <argument name="cacheId" xsi:type="string">klarna_config</argument>
        </arguments>
    </virtualType>
    <virtualType name="Klarna\Core\Config\Reader\Virtual"
                 type="Magento\Framework\Config\Reader\Filesystem">
        <arguments>
            <argument name="converter" xsi:type="object">Klarna\Core\Config\Converter\Dom</argument>
            <argument name="schemaLocator" xsi:type="object">Klarna\Core\Config\SchemaLocator\Virtual</argument>
            <argument name="fileName" xsi:type="string">klarna.xml</argument>
            <argument name="idAttributes" xsi:type="array">
                <item name="/klarna/external_payment_method" xsi:type="string">id</item>
                <item name="/klarna/api_type" xsi:type="string">id</item>
                <item name="/klarna/api_type/options/option" xsi:type="string">id</item>
                <item name="/klarna/api_version" xsi:type="string">id</item>
                <item name="/klarna/api_version/options/option" xsi:type="string">id</item>
                <item name="/klarna/merchant_checkbox" xsi:type="string">id</item>
                <item name="/klarna/order_lines" xsi:type="string">id</item>
                <item name="/klarna/order_lines/line" xsi:type="string">id</item>
            </argument>
        </arguments>
    </virtualType>
    <virtualType name="Klarna\Core\Config\SchemaLocator\Virtual"
                 type="Magento\Framework\Config\GenericSchemaLocator">
        <arguments>
            <argument name="moduleName" xsi:type="string">Klarna_Core</argument>
            <argument name="schema" xsi:type="string">klarna.xsd</argument>
        </arguments>
    </virtualType>

    <!-- Custom Logger -->
    <type name="Klarna\Core\Logger\Handlers\File">
        <arguments>
            <argument name="filesystem" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
        </arguments>
    </type>

    <type name="Klarna\Core\Logger\Logger">
        <arguments>
            <argument name="name" xsi:type="string">klarnaDebugLogger</argument>
            <argument name="handlers"  xsi:type="array">
                <item name="system" xsi:type="object">Klarna\Core\Logger\Handlers\File</item>
            </argument>
        </arguments>
    </type>

    <!-- Constructor injection -->
    <type name="Klarna\Core\Model\System\Config\Source\Base">
        <arguments>
            <argument name="config" xsi:type="object">Klarna\Core\Config\Virtual</argument>
        </arguments>
    </type>
    <type name="Klarna\Core\Model\Api\Rest\Service">
        <arguments>
            <argument name="log" xsi:type="object">Klarna\Core\Logger\Logger</argument>
        </arguments>
    </type>
    <type name="Klarna\Core\Helper\KlarnaConfig">
        <arguments>
            <argument name="config" xsi:type="object">Klarna\Core\Config\Virtual</argument>
        </arguments>
    </type>
    <type name="Klarna\Core\Model\Checkout\Orderline\Collector">
        <arguments>
            <argument name="logger" xsi:type="object">Klarna\Core\Logger\Logger</argument>
        </arguments>
    </type>
    <preference for="Klarna\Core\Api\VersionInterface" type="Klarna\Core\Config\ApiVersion" />
    <preference for="Klarna\Core\Api\ServiceInterface" type="Klarna\Core\Model\Api\Rest\Service" />
    <preference for="Klarna\Core\Api\OrderInterface" type="Klarna\Core\Model\Order" />
    <preference for="Klarna\Core\Api\OrderRepositoryInterface" type="Klarna\Core\Model\OrderRepository" />

    <!-- logs -->
    <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
        <arguments>
            <argument name="collections" xsi:type="array">
                <item name="log_listing_data_source" xsi:type="string">
                    Klarna\Core\Model\ResourceModel\Log\Grid\Collection
                </item>
            </argument>
        </arguments>
    </type>

    <virtualType name="Klarna\Core\Model\ResourceModel\Log\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
        <arguments>
            <argument name="mainTable" xsi:type="string">klarna_logs</argument>
            <argument name="resourceModel" xsi:type="string">
                Klarna\Core\Model\ResourceModel\Log
            </argument>
        </arguments>
    </virtualType>

    <virtualType name="LogsGridFilterPool" type="Magento\Framework\View\Element\UiComponent\DataProvider\FilterPool">
        <arguments>
            <argument name="appliers" xsi:type="array">
                <item name="regular" xsi:type="object">
                    Magento\Framework\View\Element\UiComponent\DataProvider\RegularFilter
                </item>
                <item name="fulltext" xsi:type="object">
                    Magento\Framework\View\Element\UiComponent\DataProvider\FulltextFilter
                </item>
            </argument>
        </arguments>
    </virtualType>

    <virtualType name="LogsGridDataProvider" type="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider">
        <arguments>
            <argument name="collection" xsi:type="object" shared="false">
                Klarna\Core\Model\ResourceModel\Log\Collection
            </argument>
            <argument name="filterPool" xsi:type="object" shared="false">
                LogsGridFilterPool
            </argument>
        </arguments>
    </virtualType>

    <preference for="Klarna\Core\Api\LogRepositoryInterface" type="Klarna\Core\Model\LogRepository"/>
    <preference for="Klarna\Core\Api\Data\LogInterface" type="Klarna\Core\Model\Log"/>

    <!-- Sensitive and environment settings -->
    <type name="Magento\Config\Model\Config\TypePool">
        <arguments>
            <argument name="sensitive" xsi:type="array">
                <item name="klarna/api/merchant_id" xsi:type="string">1</item>
                <item name="klarna/api/shared_secret" xsi:type="string">1</item>
            </argument>
            <argument name="environment" xsi:type="array">
                <item name="klarna/api/test_mode" xsi:type="string">1</item>
                <item name="klarna/api/debug" xsi:type="string">1</item>
            </argument>
        </arguments>
    </type>
</config>