src/RobotsTxtParser/Directives/CrawlDelay.php 1 location
|
@@ 40-42 (lines=3) @@
|
| 37 |
|
*/ |
| 38 |
|
public function __construct($directive = self::DIRECTIVE_CRAWL_DELAY) |
| 39 |
|
{ |
| 40 |
|
if (!in_array($directive, self::DIRECTIVE, true)) { |
| 41 |
|
throw new ParserException('Directive not allowed here, has to be `' . self::DIRECTIVE_CRAWL_DELAY . '` or `' . self::DIRECTIVE_CACHE_DELAY . '`'); |
| 42 |
|
} |
| 43 |
|
$this->directive = mb_strtolower($directive); |
| 44 |
|
} |
| 45 |
|
|
src/RobotsTxtParser/Directives/DisAllow.php 1 location
|
@@ 64-66 (lines=3) @@
|
| 61 |
|
*/ |
| 62 |
|
public function __construct($directive) |
| 63 |
|
{ |
| 64 |
|
if (!in_array($directive, self::DIRECTIVE, true)) { |
| 65 |
|
throw new ParserException('Directive not allowed here, has to be `' . self::DIRECTIVE_ALLOW . '` or `' . self::DIRECTIVE_DISALLOW . '`'); |
| 66 |
|
} |
| 67 |
|
$this->directive = mb_strtolower($directive); |
| 68 |
|
$this->cleanParam = new CleanParam(); |
| 69 |
|
$this->host = new Host(); |