1 | <?php |
||
13 | class StatusCodeParser implements RobotsTxtInterface |
||
14 | { |
||
15 | use DirectiveParserCommons; |
||
16 | |||
17 | /** |
||
18 | * Status code |
||
19 | * @var int |
||
20 | */ |
||
21 | private $code; |
||
22 | |||
23 | /** |
||
24 | * Scheme |
||
25 | * @var string|false |
||
26 | */ |
||
27 | private $scheme; |
||
28 | |||
29 | /** |
||
30 | * Constructor |
||
31 | * |
||
32 | * @param int|null $code - HTTP status code |
||
33 | * @param string|false $scheme |
||
34 | * @throws StatusCodeException |
||
35 | */ |
||
36 | public function __construct($code, $scheme) |
||
44 | |||
45 | /** |
||
46 | * Validate |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function validate() |
||
57 | |||
58 | /** |
||
59 | * Check if the code overrides the robots.txt file |
||
60 | * |
||
61 | * @return string|false |
||
62 | */ |
||
63 | public function accessOverride() |
||
76 | } |
||
77 |