1 | <?php |
||
12 | class Host implements DirectiveInterface, RobotsTxtInterface |
||
13 | { |
||
14 | use UrlTools; |
||
15 | |||
16 | /** |
||
17 | * Directive |
||
18 | */ |
||
19 | const DIRECTIVE = self::DIRECTIVE_HOST; |
||
20 | |||
21 | /** |
||
22 | * Host array |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $array = []; |
||
26 | |||
27 | /** |
||
28 | * Host constructor. |
||
29 | */ |
||
30 | public function __construct() |
||
33 | |||
34 | /** |
||
35 | * Add |
||
36 | * |
||
37 | * @param string $line |
||
38 | * @return bool |
||
39 | */ |
||
40 | public function add($line) |
||
65 | |||
66 | /** |
||
67 | * Check |
||
68 | * |
||
69 | * @param string $url |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function check($url) |
||
94 | |||
95 | /** |
||
96 | * Export |
||
97 | * |
||
98 | * @return array |
||
99 | */ |
||
100 | public function export() |
||
104 | } |
||
105 |