Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | public function __construct( |
||
8 | string $id, |
||
9 | bool $fromCache = false, |
||
10 | 3 | bool $debug = true, |
|
11 | ?string $dataDirectory = null |
||
12 | 3 | ) { |
|
13 | if (true === $fromCache) { |
||
14 | 3 | $this->harvester = '\PiedWeb\SeoPocketCrawler\CrawlerUrlFromCache'; |
|
15 | } |
||
16 | 3 | ||
17 | 3 | $this->config = CrawlerConfig::loadFrom($id, $dataDirectory); |
|
18 | |||
19 | 3 | $this->resetLinks(); |
|
20 | |||
21 | 3 | //$this->recorder = new Recorder($this->config->getDataFolder(), $this->config->getCacheMethod()); |
|
22 | 3 | ||
23 | 3 | $this->urls[$this->config->getStartUrl()] = null; |
|
24 | |||
25 | 3 | $this->debug = $debug; |
|
26 | } |
||
33 |