1 | <?php |
||
9 | class FacebookProductItem implements ItemInterface |
||
10 | { |
||
11 | /** @var integer */ |
||
12 | protected $id; |
||
13 | |||
14 | /** @var string */ |
||
15 | protected $title; |
||
16 | |||
17 | /** @var string */ |
||
18 | protected $url; |
||
19 | |||
20 | /** @var string */ |
||
21 | protected $availability; |
||
22 | |||
23 | /** @var string */ |
||
24 | protected $condition; |
||
25 | |||
26 | /** @var string */ |
||
27 | protected $price; |
||
28 | |||
29 | /** @var string */ |
||
30 | protected $googleProductCategory; |
||
31 | |||
32 | /** @var string */ |
||
33 | protected $imageLink; |
||
34 | |||
35 | /** @var string */ |
||
36 | protected $description; |
||
37 | |||
38 | /** @var string */ |
||
39 | protected $brand; |
||
40 | |||
41 | /** @var string */ |
||
42 | protected $content; |
||
43 | |||
44 | /** @var string */ |
||
45 | protected $creator; |
||
46 | |||
47 | /** @var array */ |
||
48 | protected $categories = []; |
||
49 | |||
50 | /** @var string */ |
||
51 | protected $guid; |
||
52 | |||
53 | /** @var bool */ |
||
54 | protected $isPermalink; |
||
55 | |||
56 | /** @var int */ |
||
57 | protected $pubDate; |
||
58 | |||
59 | /** @var array */ |
||
60 | protected $enclosure; |
||
61 | |||
62 | /** |
||
63 | * Set item id |
||
64 | * @param integer $id |
||
65 | * @return $this |
||
66 | */ |
||
67 | public function id($id) |
||
73 | |||
74 | /** |
||
75 | * Set item title |
||
76 | * @param string $title |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function title($title) |
||
85 | |||
86 | /** |
||
87 | * Set item URL |
||
88 | * @param string $url |
||
89 | * @return $this |
||
90 | */ |
||
91 | public function url($url) |
||
97 | |||
98 | /** |
||
99 | * Set item description |
||
100 | * @param string $description |
||
101 | * @return $this |
||
102 | */ |
||
103 | public function description($description) |
||
109 | |||
110 | /** |
||
111 | * Set item brand |
||
112 | * @param string $brand |
||
113 | * @return $this |
||
114 | */ |
||
115 | public function brand($brand) |
||
121 | |||
122 | /** |
||
123 | * Set item availability |
||
124 | * @param string $availability |
||
125 | * @return $this |
||
126 | */ |
||
127 | public function availability($availability) |
||
133 | |||
134 | /** |
||
135 | * Set item condition |
||
136 | * @param string $condition |
||
137 | * @return $this |
||
138 | */ |
||
139 | public function condition($condition) |
||
145 | |||
146 | /** |
||
147 | * Set item price |
||
148 | * @param string $price |
||
149 | * @return $this |
||
150 | */ |
||
151 | public function price($price) |
||
157 | |||
158 | /** |
||
159 | * Set item googleProductCategory |
||
160 | * @param string $googleProductCategory |
||
161 | * @return $this |
||
162 | */ |
||
163 | public function googleProductCategory($googleProductCategory) |
||
169 | |||
170 | /** |
||
171 | * Set item imageLink |
||
172 | * @param string $imageLink |
||
173 | * @return $this |
||
174 | */ |
||
175 | public function imageLink($imageLink) |
||
181 | |||
182 | |||
183 | /** |
||
184 | * Set item category |
||
185 | * @param string $name Category name |
||
186 | * @param string $domain Category URL |
||
187 | * @return $this |
||
188 | */ |
||
189 | public function category($name, $domain = null) |
||
195 | |||
196 | /** |
||
197 | * Set GUID |
||
198 | * @param string $guid |
||
199 | * @param bool $isPermalink |
||
200 | * @return $this |
||
201 | */ |
||
202 | public function guid($guid, $isPermalink = false) |
||
209 | |||
210 | /** |
||
211 | * Set published date |
||
212 | * @param int $pubDate Unix timestamp |
||
213 | * @return $this |
||
214 | */ |
||
215 | public function pubDate($pubDate) |
||
221 | |||
222 | /** |
||
223 | * Set enclosure |
||
224 | * @param string $url Url to media file |
||
225 | * @param int $length Length in bytes of the media file |
||
226 | * @param string $type Media type, default is audio/mpeg |
||
227 | * @return $this |
||
228 | */ |
||
229 | public function enclosure($url, $length = 0, $type = 'audio/mpeg') |
||
235 | |||
236 | /** |
||
237 | * Append item to the channel |
||
238 | * @param ChannelInterface $channel |
||
239 | * @return $this |
||
240 | */ |
||
241 | public function appendTo(ChannelInterface $channel) |
||
247 | |||
248 | /** |
||
249 | * Set author name for article |
||
250 | * |
||
251 | * @param $creator |
||
252 | * @return $this |
||
253 | */ |
||
254 | public function creator($creator) |
||
260 | |||
261 | /** |
||
262 | * @param $content |
||
263 | * @return $this |
||
264 | */ |
||
265 | public function content($content) |
||
271 | |||
272 | /** |
||
273 | * Return XML object |
||
274 | * @return SimpleXMLElement |
||
275 | */ |
||
276 | public function asXML() |
||
293 | } |
||
294 |