1 | <?php |
||
13 | class SitemapGenerator |
||
14 | { |
||
15 | /** @var \Spatie\Sitemap\Sitemap */ |
||
16 | protected $sitemap; |
||
17 | |||
18 | /** @var string */ |
||
19 | protected $urlToBeCrawled = ''; |
||
20 | |||
21 | /** @var \Spatie\Crawler\Crawler */ |
||
22 | protected $crawler; |
||
23 | |||
24 | /** @var callable */ |
||
25 | protected $shouldCrawl; |
||
26 | |||
27 | /** @var callable */ |
||
28 | protected $hasCrawled; |
||
29 | |||
30 | /** @var int */ |
||
31 | protected $concurrency = 10; |
||
32 | |||
33 | /** @var int|null */ |
||
34 | protected $maximumCrawlCount = null; |
||
35 | |||
36 | /** |
||
37 | * @param string $urlToBeCrawled |
||
38 | * |
||
39 | * @return static |
||
40 | */ |
||
41 | public static function create(string $urlToBeCrawled) |
||
45 | |||
46 | public function __construct(Crawler $crawler) |
||
56 | |||
57 | public function setConcurrency(int $concurrency) |
||
61 | |||
62 | public function setMaximumCrawlCount(int $maximumCrawlCount) |
||
66 | |||
67 | public function setUrl(string $urlToBeCrawled) |
||
73 | |||
74 | public function shouldCrawl(callable $shouldCrawl) |
||
80 | |||
81 | public function hasCrawled(callable $hasCrawled) |
||
87 | |||
88 | public function getSitemap(): Sitemap |
||
107 | |||
108 | /** |
||
109 | * @param string $path |
||
110 | * |
||
111 | * @return $this |
||
112 | */ |
||
113 | public function writeToFile(string $path) |
||
119 | |||
120 | protected function getCrawlProfile(): CrawlProfile |
||
143 | |||
144 | protected function getCrawlObserver(): Observer |
||
156 | } |
||
157 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.