@@ -28,22 +28,22 @@ class AmazonFeed extends AmazonFeedsCore{
28
28
protected $ response ;
29
29
protected $ feedContent ;
30
30
protected $ feedMD5 ;
31
-
31
+
32
32
/**
33
33
* AmazonFeed submits a Feed to Amazon.
34
- *
34
+ *
35
35
* The parameters are passed to the parent constructor, which are
36
36
* in turn passed to the AmazonCore constructor. See it for more information
37
37
* on these parameters and common methods.
38
- * @param string $s [optional] <p>Name for the store you want to use.
39
- * This parameter is optional if only one store is defined in the config file.</p>
40
38
* @param boolean $mock [optional] <p>This is a flag for enabling Mock Mode.
41
39
* This defaults to <b>FALSE</b>.</p>
42
40
* @param array|string $m [optional] <p>The files (or file) to use in Mock Mode.</p>
43
41
* @param string $config [optional] <p>An alternate config file to set. Used for testing.</p>
42
+ * @internal param string $s [optional] <p>Name for the store you want to use.
43
+ * This parameter is optional if only one store is defined in the config file.</p>
44
44
*/
45
- public function __construct ($ s = null , $ mock = false , $ m = null , $ config = null ){
46
- parent ::__construct ($ s , $ mock , $ m , $ config );
45
+ public function __construct ($ mock = false , $ m = null , $ config = null ){
46
+ parent ::__construct ($ m , $ config );
47
47
include ($ this ->env );
48
48
49
49
$ this ->options ['Action ' ] = 'SubmitFeed ' ;
@@ -293,16 +293,18 @@ protected function parseXML($xml){
293
293
294
294
$ this ->log ("Successfully submitted feed # " .$ this ->response ['FeedSubmissionId ' ].' ( ' .$ this ->response ['FeedType ' ].') ' );
295
295
}
296
-
296
+
297
297
/**
298
298
* Generates array for Header.
299
- *
299
+ *
300
300
* This method creates the Header array to use with cURL. It contains the Content MD5.
301
301
* @return array
302
302
*/
303
303
protected function genHeader (){
304
- $ return [0 ] = "Content-MD5: " .$ this ->feedMD5 ;
305
- return $ return ;
304
+ return [
305
+ "Content-Type: text/xml " ,
306
+ "Content-MD5: " . $ this ->feedMD5 ,
307
+ ];
306
308
}
307
309
308
310
/**
@@ -325,7 +327,15 @@ public function getResponse(){
325
327
}
326
328
}
327
329
330
+ /**
331
+ *
332
+ * Returns currently set feed content
333
+ * @return mixed
334
+ */
335
+ public function getFeedContent (){
336
+ return $ this ->feedContent ;
337
+ }
328
338
329
339
330
340
}
331
- ?>
341
+ ?>
0 commit comments