1 | <?php |
||
35 | trait CsvTrait |
||
36 | { |
||
37 | |||
38 | /** |
||
39 | * The subject's delimiter character for CSV files. |
||
40 | * |
||
41 | * @var string |
||
42 | * @Type("string") |
||
43 | */ |
||
44 | protected $delimiter = ','; |
||
45 | |||
46 | /** |
||
47 | * The subject's enclosure character for CSV files. |
||
48 | * |
||
49 | * @var string |
||
50 | * @Type("string") |
||
51 | */ |
||
52 | protected $enclosure = '"'; |
||
53 | |||
54 | /** |
||
55 | * The subject's escape character for CSV files. |
||
56 | * |
||
57 | * @var string |
||
58 | * @Type("string") |
||
59 | */ |
||
60 | protected $escape = '\\'; |
||
61 | |||
62 | /** |
||
63 | * The subject's source charset for the CSV file. |
||
64 | * |
||
65 | * @var string |
||
66 | * @Type("string") |
||
67 | * @SerializedName("from-charset") |
||
68 | */ |
||
69 | protected $fromCharset; |
||
70 | |||
71 | /** |
||
72 | * The subject's target charset for a CSV file. |
||
73 | * |
||
74 | * @var string |
||
75 | * @Type("string") |
||
76 | * @SerializedName("to-charset") |
||
77 | */ |
||
78 | protected $toCharset; |
||
79 | |||
80 | /** |
||
81 | * The subject's file mode for a CSV target file. |
||
82 | * |
||
83 | * @var string |
||
84 | * @Type("string") |
||
85 | * @SerializedName("file-mode") |
||
86 | */ |
||
87 | protected $fileMode; |
||
88 | |||
89 | /** |
||
90 | * Return's the delimiter character to use, default value is comma (,). |
||
91 | * |
||
92 | * @return string The delimiter character |
||
93 | */ |
||
94 | public function getDelimiter() |
||
98 | |||
99 | /** |
||
100 | * The enclosure character to use, default value is double quotation ("). |
||
101 | * |
||
102 | * @return string The enclosure character |
||
103 | */ |
||
104 | public function getEnclosure() |
||
108 | |||
109 | /** |
||
110 | * The escape character to use, default value is backslash (\). |
||
111 | * |
||
112 | * @return string The escape character |
||
113 | */ |
||
114 | public function getEscape() |
||
118 | |||
119 | /** |
||
120 | * The file encoding of the CSV source file, default value is UTF-8. |
||
121 | * |
||
122 | * @return string The charset used by the CSV source file |
||
123 | */ |
||
124 | public function getFromCharset() |
||
128 | |||
129 | /** |
||
130 | * The file encoding of the CSV targetfile, default value is UTF-8. |
||
131 | * |
||
132 | * @return string The charset used by the CSV target file |
||
133 | */ |
||
134 | public function getToCharset() |
||
138 | |||
139 | /** |
||
140 | * The file mode of the CSV target file, either one of write or append, default is write. |
||
141 | * |
||
142 | * @return string The file mode of the CSV target file |
||
143 | */ |
||
144 | public function getFileMode() |
||
148 | } |
||
149 |