From b44fedc1b45d022474de33f80fabb6853b9b9878 Mon Sep 17 00:00:00 2001 From: Mustapha Alaouy Date: Wed, 3 Dec 2014 22:22:02 +0000 Subject: [PATCH] fixed pagetoken --- src/Alaouy/Youtube/Youtube.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Alaouy/Youtube/Youtube.php b/src/Alaouy/Youtube/Youtube.php index 87f4d11..59ed658 100644 --- a/src/Alaouy/Youtube/Youtube.php +++ b/src/Alaouy/Youtube/Youtube.php @@ -425,9 +425,16 @@ public function decodeList(&$apiData) { 'totalResults' => $resObj->pageInfo->totalResults, 'kind' => $resObj->kind, 'etag' => $resObj->etag, + 'prevPageToken' => NULL, + 'nextPageToken' => NULL ); + + if(isset($resObj->prevPageToken)){ + $this->page_info['prevPageToken'] = $resObj->prevPageToken; + } + if (isset($resObj->nextPageToken)) { - $this->page_info = $resObj->nextPageToken; + $this->page_info['nextPageToken'] = $resObj->nextPageToken; } $itemsArray = $resObj->items;