1 | <?php |
||
5 | class LoadDataInFile { |
||
6 | |||
7 | private $delimiter = ','; |
||
8 | private $enclosure = '"'; |
||
9 | private $eol = "\\n"; |
||
10 | private $escape = '\\'; |
||
11 | private $ignoreLines = 0; |
||
12 | private $csvFile; |
||
13 | private $tableName; |
||
14 | private $columnMap; |
||
15 | private $columnBinds = []; |
||
16 | |||
17 | public function getDelimiter() { return $this->delimiter; } |
||
19 | |||
20 | public function getEnclosure() { return $this->enclosure; } |
||
22 | |||
23 | public function getEOL() { return $this->eol; } |
||
25 | |||
26 | public function getEscape() { return $this->escape; } |
||
28 | |||
29 | public function getTableName() { return $this->tableName; } |
||
31 | |||
32 | public function getIgnoreLines() { return $this->ignoreLines; } |
||
34 | |||
35 | public function getColMap() { return $this->columnMap; } |
||
37 | |||
38 | public function getColumnBinds() { return $this->columnBinds; } |
||
40 | |||
41 | public function getCsvFile() { return $this->csvFile; } |
||
43 | |||
44 | 1 | public function getQuery() { |
|
58 | |||
59 | 1 | public function getBinds() { |
|
64 | |||
65 | 2 | public function getColVars() { |
|
71 | |||
72 | 4 | public function getSetExpression() { |
|
78 | |||
79 | protected function hasColumnMap() { return !empty($this->columnMap); } |
||
81 | |||
82 | 3 | protected function getColMapExpression() { |
|
92 | |||
93 | 1 | protected function getColVarsExpression() { |
|
96 | |||
97 | 3 | protected function getBoundSetExpression() { |
|
104 | |||
105 | 4 | protected function arrayToStringList(array $items) { |
|
108 | |||
109 | private function escape($string) { return addslashes($string); } |
||
110 | } |
||
111 |