@@ -104,6 +104,13 @@ class OperationDefinitionObject
104
104
*/
105
105
private $ returnRegex ;
106
106
107
+ /**
108
+ * Index of element to be returned from "returnRegex" matches.
109
+ *
110
+ * @var string
111
+ */
112
+ private $ returnIndex ;
113
+
107
114
/**
108
115
* Determines if operation should remove backend_name from URL.
109
116
* @var boolean
@@ -125,6 +132,7 @@ class OperationDefinitionObject
125
132
* @param boolean $removeBackend
126
133
* @param string $successRegex
127
134
* @param string $returnRegex
135
+ * @param string $returnIndex
128
136
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
129
137
*/
130
138
public function __construct (
@@ -140,7 +148,8 @@ public function __construct(
140
148
$ contentType ,
141
149
$ removeBackend ,
142
150
$ successRegex = null ,
143
- $ returnRegex = null
151
+ $ returnRegex = null ,
152
+ $ returnIndex = null
144
153
) {
145
154
$ this ->name = $ name ;
146
155
$ this ->operation = $ operation ;
@@ -153,6 +162,7 @@ public function __construct(
153
162
$ this ->operationMetadata = $ metaData ;
154
163
$ this ->successRegex = $ successRegex ;
155
164
$ this ->returnRegex = $ returnRegex ;
165
+ $ this ->returnIndex = $ returnIndex ;
156
166
$ this ->removeBackend = $ removeBackend ;
157
167
$ this ->apiUrl = null ;
158
168
@@ -284,6 +294,16 @@ public function getReturnRegex()
284
294
return $ this ->returnRegex ;
285
295
}
286
296
297
+ /**
298
+ * Getter for return regex matches index.
299
+ *
300
+ * @return string|null
301
+ */
302
+ public function getReturnIndex ()
303
+ {
304
+ return $ this ->returnIndex ;
305
+ }
306
+
287
307
/**
288
308
* Function to append or add query parameters
289
309
*
0 commit comments