1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the slince/shopify-api-php |
5
|
|
|
* |
6
|
|
|
* (c) Slince <[email protected]> |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the MIT license that is bundled |
9
|
|
|
* with this source code in the file LICENSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Slince\Shopify\Manager\Asset; |
13
|
|
|
|
14
|
|
|
class Asset |
15
|
|
|
{ |
16
|
|
|
/** |
17
|
|
|
* @var string |
18
|
|
|
*/ |
19
|
|
|
protected $key; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* @var string |
23
|
|
|
*/ |
24
|
|
|
protected $publicUrl; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @var string |
28
|
|
|
*/ |
29
|
|
|
protected $createdAt; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @var string |
33
|
|
|
*/ |
34
|
|
|
protected $updatedAt; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @var string |
38
|
|
|
*/ |
39
|
|
|
protected $contentType; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @var number |
43
|
|
|
*/ |
44
|
|
|
protected $size; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @var int |
48
|
|
|
*/ |
49
|
|
|
protected $themeId; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @var string |
53
|
|
|
*/ |
54
|
|
|
protected $value; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @return string |
58
|
|
|
*/ |
59
|
|
|
public function getKey() |
60
|
|
|
{ |
61
|
|
|
return $this->key; |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @param string $key |
66
|
|
|
* |
67
|
|
|
* @return Asset |
68
|
|
|
*/ |
69
|
|
|
public function setKey($key) |
70
|
|
|
{ |
71
|
|
|
$this->key = $key; |
72
|
|
|
|
73
|
|
|
return $this; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @return string |
78
|
|
|
*/ |
79
|
|
|
public function getPublicUrl() |
80
|
|
|
{ |
81
|
|
|
return $this->publicUrl; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @param string $publicUrl |
86
|
|
|
* |
87
|
|
|
* @return Asset |
88
|
|
|
*/ |
89
|
|
|
public function setPublicUrl($publicUrl) |
90
|
|
|
{ |
91
|
|
|
$this->publicUrl = $publicUrl; |
92
|
|
|
|
93
|
|
|
return $this; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @return string |
98
|
|
|
*/ |
99
|
|
|
public function getCreatedAt() |
100
|
|
|
{ |
101
|
|
|
return $this->createdAt; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @param string $createdAt |
106
|
|
|
* |
107
|
|
|
* @return Asset |
108
|
|
|
*/ |
109
|
|
|
public function setCreatedAt($createdAt) |
110
|
|
|
{ |
111
|
|
|
$this->createdAt = $createdAt; |
112
|
|
|
|
113
|
|
|
return $this; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @return string |
118
|
|
|
*/ |
119
|
|
|
public function getUpdatedAt() |
120
|
|
|
{ |
121
|
|
|
return $this->updatedAt; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @param string $updatedAt |
126
|
|
|
* |
127
|
|
|
* @return Asset |
128
|
|
|
*/ |
129
|
|
|
public function setUpdatedAt($updatedAt) |
130
|
|
|
{ |
131
|
|
|
$this->updatedAt = $updatedAt; |
132
|
|
|
|
133
|
|
|
return $this; |
134
|
|
|
} |
135
|
|
|
|
136
|
|
|
/** |
137
|
|
|
* @return string |
138
|
|
|
*/ |
139
|
|
|
public function getContentType() |
140
|
|
|
{ |
141
|
|
|
return $this->contentType; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* @param string $contentType |
146
|
|
|
* |
147
|
|
|
* @return Asset |
148
|
|
|
*/ |
149
|
|
|
public function setContentType($contentType) |
150
|
|
|
{ |
151
|
|
|
$this->contentType = $contentType; |
152
|
|
|
|
153
|
|
|
return $this; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @return number |
158
|
|
|
*/ |
159
|
|
|
public function getSize() |
160
|
|
|
{ |
161
|
|
|
return $this->size; |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* @param number $size |
166
|
|
|
* |
167
|
|
|
* @return Asset |
168
|
|
|
*/ |
169
|
|
|
public function setSize($size) |
170
|
|
|
{ |
171
|
|
|
$this->size = $size; |
172
|
|
|
|
173
|
|
|
return $this; |
174
|
|
|
} |
175
|
|
|
|
176
|
|
|
/** |
177
|
|
|
* @return int |
178
|
|
|
*/ |
179
|
|
|
public function getThemeId() |
180
|
|
|
{ |
181
|
|
|
return $this->themeId; |
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
/** |
185
|
|
|
* @param int $themeId |
186
|
|
|
* |
187
|
|
|
* @return Asset |
188
|
|
|
*/ |
189
|
|
|
public function setThemeId($themeId) |
190
|
|
|
{ |
191
|
|
|
$this->themeId = $themeId; |
192
|
|
|
|
193
|
|
|
return $this; |
194
|
|
|
} |
195
|
|
|
|
196
|
|
|
/** |
197
|
|
|
* @return string |
198
|
|
|
*/ |
199
|
|
|
public function getValue() |
200
|
|
|
{ |
201
|
|
|
return $this->value; |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
/** |
205
|
|
|
* @param string $value |
206
|
|
|
* |
207
|
|
|
* @return Asset |
208
|
|
|
*/ |
209
|
|
|
public function setValue($value) |
210
|
|
|
{ |
211
|
|
|
$this->value = $value; |
212
|
|
|
|
213
|
|
|
return $this; |
214
|
|
|
} |
215
|
|
|
} |