File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace OpenCloud \Queues \Collection ;
4+
5+ use OpenCloud \Common \Collection \PaginatedIterator ;
6+
7+ class QueuesIterator extends PaginatedIterator
8+ {
9+
10+
11+
12+ }
Original file line number Diff line number Diff line change @@ -244,7 +244,12 @@ public function createMessages(array $messages)
244244 $ parts = array_merge ($ this ->getUrl ()->getParts (), parse_url ($ location ));
245245 $ url = Url::factory (Url::buildUrl ($ parts ));
246246
247- return $ this ->getService ()->resourceList ('Message ' , $ url , $ this );
247+ $ options = $ this ->makeResourceIteratorOptions (__NAMESPACE__ . '\\Message ' ) + array (
248+ 'baseUrl ' => $ url ,
249+ 'limit.page ' => 10
250+ );
251+
252+ return PaginatedIterator::factory ($ this , $ options );
248253 }
249254
250255 return true ;
@@ -284,9 +289,14 @@ public function listMessages(array $options = array())
284289 $ options ['ids ' ] = implode (', ' , $ options ['ids ' ]);
285290 }
286291
287- $ url = $ this ->url ('messages ' , $ options );
292+ $ url = $ this ->getUrl ('messages ' , $ options );
293+
294+ $ options = $ this ->makeResourceIteratorOptions (__NAMESPACE__ . '\\Message ' ) + array (
295+ 'baseUrl ' => $ url ,
296+ 'limit.page ' => 10
297+ );
288298
289- return $ this -> getService ()-> resourceList ( ' Message ' , $ url , $ this );
299+ return PaginatedIterator:: factory ( $ this , $ options );
290300 }
291301
292302 /**
You can’t perform that action at this time.
0 commit comments