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 | * |
||
30 | * |
||
31 | * @return int |
||
32 | */ |
||
33 | 6 | public function getNbAdsPerPage() |
|
37 | |||
38 | /** |
||
39 | * Return the number of page |
||
40 | * |
||
41 | * @return int |
||
42 | */ |
||
43 | 6 | public function getNbPages() |
|
47 | |||
48 | /** |
||
49 | * Get an array containing the ads of the current result page |
||
50 | * |
||
51 | * @return Array |
||
52 | */ |
||
53 | 4 | public function getAds() |
|
65 | |||
66 | /** |
||
67 | * Return the Ad's ID |
||
68 | * |
||
69 | * @return array |
||
70 | */ |
||
71 | 4 | public function getAdsId() |
|
82 | } |
||
83 |