1 | <?php |
||
12 | class SitemapGenerator |
||
13 | { |
||
14 | /** @var \Spatie\Sitemap\Sitemap */ |
||
15 | protected $sitemap; |
||
16 | |||
17 | /** @var string */ |
||
18 | protected $urlToBeCrawled = ''; |
||
19 | |||
20 | /** @var \Spatie\Crawler\Crawler */ |
||
21 | protected $crawler; |
||
22 | |||
23 | /** @var callable */ |
||
24 | protected $shouldCrawl; |
||
25 | |||
26 | /** @var callable */ |
||
27 | protected $hasCrawled; |
||
28 | |||
29 | /** @var int */ |
||
30 | protected $concurrency = 10; |
||
31 | |||
32 | /** |
||
33 | * @param string $urlToBeCrawled |
||
34 | * |
||
35 | * @return static |
||
36 | */ |
||
37 | public static function create(string $urlToBeCrawled) |
||
41 | |||
42 | public function __construct(Crawler $crawler) |
||
52 | |||
53 | public function setConcurrency(int $concurrency) |
||
57 | |||
58 | public function setUrl(string $urlToBeCrawled) |
||
64 | |||
65 | public function shouldCrawl(callable $shouldCrawl) |
||
71 | |||
72 | public function hasCrawled(callable $hasCrawled) |
||
78 | |||
79 | public function getSitemap(): Sitemap |
||
89 | |||
90 | /** |
||
91 | * @param string $path |
||
92 | * |
||
93 | * @return $this |
||
94 | */ |
||
95 | public function writeToFile(string $path) |
||
101 | |||
102 | protected function getCrawlProfile(): Profile |
||
118 | |||
119 | protected function getCrawlObserver(): Observer |
||
131 | } |
||
132 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.