@@ 64-75 (lines=12) @@ | ||
61 | * @return \Generator |
|
62 | * @throws \RuntimeException |
|
63 | */ |
|
64 | public function findAllBy(VideoFilter $filter, $pages) |
|
65 | { |
|
66 | $currentPage = 1; |
|
67 | while ($currentPage <= $pages) { |
|
68 | $paginator = $this->findBy($filter); |
|
69 | $paginator->setPage($currentPage); |
|
70 | ||
71 | yield $paginator->items(); |
|
72 | ||
73 | $currentPage++; |
|
74 | } |
|
75 | } |
|
76 | ||
77 | /** |
|
78 | * Get detail of a video |
|
@@ 157-168 (lines=12) @@ | ||
154 | * @return \Generator |
|
155 | * @throws \RuntimeException |
|
156 | */ |
|
157 | public function findAllDeletedBy(VideoFilter $filter, $pages) |
|
158 | { |
|
159 | $currentPage = 1; |
|
160 | while ($currentPage <= $pages) { |
|
161 | $paginator = $this->findDeletedBy($filter); |
|
162 | $paginator->setPage($currentPage); |
|
163 | ||
164 | yield $paginator->items(); |
|
165 | ||
166 | $currentPage++; |
|
167 | } |
|
168 | } |
|
169 | ||
170 | } |
|
171 |