PunchoutCatalogsBusinessFactory::getVaultFacade()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
/**
4
 * Copyright © 2016-present Spryker Systems GmbH. All rights reserved.
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\PunchoutCatalogs\Business;
9
10
use Spryker\Zed\Kernel\Business\AbstractBusinessFactory;
11
use SprykerEco\Zed\PunchoutCatalogs\Business\Reader\PunchoutCatalogsReader;
12
use SprykerEco\Zed\PunchoutCatalogs\Business\Reader\PunchoutCatalogsReaderInterface;
13
use SprykerEco\Zed\PunchoutCatalogs\Business\Writer\PunchoutCatalogsWriter;
14
use SprykerEco\Zed\PunchoutCatalogs\Business\Writer\PunchoutCatalogsWriterInterface;
15
use SprykerEco\Zed\PunchoutCatalogs\Dependency\Facade\PunchoutCatalogsToVaultFacadeInterface;
16
use SprykerEco\Zed\PunchoutCatalogs\PunchoutCatalogsDependencyProvider;
17
18
/**
19
 * @method \SprykerEco\Zed\PunchoutCatalogs\Persistence\PunchoutCatalogsRepositoryInterface getRepository()
20
 * @method \SprykerEco\Zed\PunchoutCatalogs\Persistence\PunchoutCatalogsEntityManagerInterface getEntityManager()()
21
 * @method \SprykerEco\Zed\PunchoutCatalogs\PunchoutCatalogsConfig getConfig()
22
 */
23
class PunchoutCatalogsBusinessFactory extends AbstractBusinessFactory
24
{
25
    /**
26
     * @return \SprykerEco\Zed\PunchoutCatalogs\Business\Reader\PunchoutCatalogsReaderInterface
27
     */
28
    public function createPunchoutCatalogsReader(): PunchoutCatalogsReaderInterface
29
    {
30
        return new PunchoutCatalogsReader(
31
            $this->getRepository(),
32
            $this->getVaultFacade()
33
        );
34
    }
35
36
    /**
37
     * @return \SprykerEco\Zed\PunchoutCatalogs\Business\Writer\PunchoutCatalogsWriterInterface
38
     */
39
    public function createPunchoutCatalogsWriter(): PunchoutCatalogsWriterInterface
40
    {
41
        return new PunchoutCatalogsWriter(
42
            $this->getEntityManager(),
43
            $this->getVaultFacade(),
44
            $this->getRepository()
45
        );
46
    }
47
48
    /**
49
     * @return \SprykerEco\Zed\PunchoutCatalogs\Dependency\Facade\PunchoutCatalogsToVaultFacadeInterface
50
     */
51
    public function getVaultFacade(): PunchoutCatalogsToVaultFacadeInterface
52
    {
53
        return $this->getProvidedDependency(PunchoutCatalogsDependencyProvider::FACADE_VAULT);
54
    }
55
}
56