Completed
Push — development ( a1df44...70f0a7 )
by Ivan
08:57
created

EcondaConfig::getFileExportDelimiter()   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
     * @return string
38
     */
39
    public function getFileExportDelimiter()
40
    {
41
        return $this->get(EcondaConstants::ECONDA_CSV_DELIMITER);
42
    }
43
44
    /**
45
     * @param string $pdoEcondaQueryName
46
     * @param string $dbEngineName
47
     *
48
     * @throws \Exception
49
     *
50
     * @return string
51
     */
52
    public function getPdoEcondaQueryClassName($pdoEcondaQueryName, $dbEngineName)
53
    {
54
        $data = [
55
            'MySql' => [
56
57
            ],
58
            'PostgreSql' => [
59
60
            ],
61
        ];
62
63
        if (!isset($data[$dbEngineName][$pdoEcondaQueryName])) {
64
            throw new Exception('Invalid PdoEcondaQueryName name: ' . $pdoEcondaQueryName);
65
        }
66
67
        return $data[$dbEngineName][$pdoEcondaQueryName];
68
    }
69
}
70