Passed
Push — development ( 5c1522...f7b72f )
by Theodoros
03:50
created

EcondaConfig::getFileExportPath()   A

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
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Econda;
9
10
use Exception;
11
use Spryker\Shared\Application\ApplicationConstants;
12
use Spryker\Zed\Kernel\AbstractBundleConfig;
13
use SprykerEco\Shared\Econda\EcondaConstants;
14
15
class EcondaConfig extends AbstractBundleConfig
16
{
17
    const ECONDA_CSV_DELIMITER = '|';
18
    const ECONDA_CSV_CATEGORY_DELIMITER = '^^';
19
20
    /**
21
     * @return string
22
     */
23
    public function getHostYves()
24
    {
25
        return $this->get(ApplicationConstants::HOST_YVES);
26
    }
27
28
    /**
29
     * @return string
30
     */
31
    public function getFileExportPath()
32
    {
33
        return $this->get(EcondaConstants::ECONDA_CSV_FOLDER_PATH);
34
    }
35
36
    /**
37
     * @param string $pdoEcondaQueryName
38
     * @param string $dbEngineName
39
     *
40
     * @throws \Exception
41
     *
42
     * @return string
43
     */
44
    public function getPdoEcondaQueryClassName($pdoEcondaQueryName, $dbEngineName)
45
    {
46
        $data = [
47
            'MySql' => [
48
49
            ],
50
            'PostgreSql' => [
51
52
            ],
53
        ];
54
55
        if (!isset($data[$dbEngineName][$pdoEcondaQueryName])) {
56
            throw new Exception('Invalid PdoEcondaQueryName name: ' . $pdoEcondaQueryName);
57
        }
58
59
        return $data[$dbEngineName][$pdoEcondaQueryName];
60
    }
61
}
62