| 1 | <?php namespace Lbc\Crawler; |
||
| 3 | class SearchResultCrawler extends CrawlerAbstract |
||
| 4 | { |
||
| 5 | /** |
||
| 6 | * Return the total number of ads of the search |
||
| 7 | * |
||
| 8 | * @return int |
||
| 9 | */ |
||
| 10 | 6 | public function getNbAds() |
|
| 23 | |||
| 24 | /** |
||
| 25 | * Return the number of ads per page. |
||
| 26 | * |
||
| 27 | * Could be dynamically guessed in future, if Leboncoin change it frequently |
||
| 28 | * Or if they add the ability for user to change it on result pages. |
||
| 29 | 6 | * |
|
| 30 | * |
||
| 31 | 6 | * @return int |
|
| 32 | */ |
||
| 33 | public function getNbAdsPerPage() |
||
| 37 | |||
| 38 | /** |
||
| 39 | 4 | * Return the number of page |
|
| 40 | * |
||
| 41 | 4 | * @return int |
|
| 42 | */ |
||
| 43 | 4 | public function getNbPages() |
|
| 47 | 4 | ||
| 48 | /** |
||
| 49 | 4 | * Get an array containing the ads of the current result page |
|
| 50 | * |
||
| 51 | * @return Array |
||
| 52 | */ |
||
| 53 | public function getAds() |
||
| 65 | |||
| 66 | 4 | /** |
|
| 67 | * Return the Ad's ID |
||
| 68 | * |
||
| 69 | * @return array |
||
| 70 | */ |
||
| 71 | public function getAdsId() |
||
| 82 | } |
||
| 83 |