File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,18 @@ class ResultItem
38
38
{
39
39
private $ id ;
40
40
private $ uri ;
41
+ private $ batchid ;
41
42
42
43
/**
43
44
* @param $id
44
45
* @param $uri
46
+ * @param $batchid
45
47
*/
46
- public function __construct ($ id , $ uri )
48
+ public function __construct ($ id , $ uri, $ batchid = '' )
47
49
{
48
50
$ this ->id = (string )$ id ;
49
51
$ this ->uri = (string )$ uri ;
52
+ $ this ->batchid = (string )$ batchid ;
50
53
}
51
54
52
55
/**
@@ -64,4 +67,12 @@ public function uri()
64
67
{
65
68
return $ this ->uri ;
66
69
}
70
+
71
+ /**
72
+ * @return string
73
+ */
74
+ public function batchid ()
75
+ {
76
+ return $ this ->batchid ;
77
+ }
67
78
}
Original file line number Diff line number Diff line change @@ -96,9 +96,11 @@ public function parse($xml)
96
96
throw new XmlException ("Xml is missing <messageheaders /> root element " );
97
97
98
98
$ results = array ();
99
+ $ batchid = $ headers ['batchid ' ];
100
+
99
101
foreach ($ headers ->messageheader as $ header )
100
102
{
101
- $ results [] = new ResultItem ($ header ["id " ], $ header ["uri " ]);
103
+ $ results [] = new ResultItem ($ header ["id " ], $ header ["uri " ], $ batchid );
102
104
}
103
105
104
106
return $ results ;
You can’t perform that action at this time.
0 commit comments