OssShipperCsvStorage.php
2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?php
/**
* Copyright (C) Alibaba Cloud Computing
* All rights reserved
*/
class Aliyun_Log_Models_OssShipperCsvStorage extends Aliyun_Log_Models_OssShipperStorage{
private $columns;
private $delimiter = ',';
private $quote = '';
private $nullIdentifier = '';
private $header = false;
/**
* @return mixed
*/
public function getColumns()
{
return $this->columns;
}
/**
* @param mixed $columns
*/
public function setColumns($columns)
{
$this->columns = $columns;
}
/**
* @return string
*/
public function getDelimiter(): string
{
return $this->delimiter;
}
/**
* @param string $delimiter
*/
public function setDelimiter(string $delimiter)
{
$this->delimiter = $delimiter;
}
/**
* @return string
*/
public function getQuote(): string
{
return $this->quote;
}
/**
* @param string $quote
*/
public function setQuote(string $quote)
{
$this->quote = $quote;
}
/**
* @return string
*/
public function getNullIdentifier(): string
{
return $this->nullIdentifier;
}
/**
* @param string $nullIdentifier
*/
public function setNullIdentifier(string $nullIdentifier)
{
$this->nullIdentifier = $nullIdentifier;
}
/**
* @return bool
*/
public function isHeader(): bool
{
return $this->header;
}
/**
* @param bool $header
*/
public function setHeader(bool $header)
{
$this->header = $header;
}
public function to_json_object(){
$detail = array(
'columns' => $this->columns,
'delimiter' => $this->delimiter,
'quote' => $this->quote,
'nullIdentifier' => $this->nullIdentifier,
'header' => $this->header
);
return array(
'detail' => $detail,
'format' => parent::getFormat()
);
}
}