Created
April 10, 2017 17:39
-
-
Save davibennun/452a4e7fdb8dc5bcabb72e4dea74be73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RequestItemsFromStore { | |
public function __construct(){ | |
$this->eBayService = new DavidSadler\Services\ShoppingService; | |
} | |
public function setStore($store){ | |
$this->storeName = $store; | |
} | |
public function getAllItems(){ | |
$totalPages = $this->eBayService->getPageCount($this->storeName); | |
$result = array(); | |
while($page <= $totalPages){ | |
$result[] = $this->getItemsFromPage($page); | |
$page++; | |
} | |
} | |
public function getItemsFromPage($pageNumber){ | |
return $this->eBayService->findItemsIneBayStores($this->storeName, $this->pageNnmber); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment