1 | <?php |
||
20 | class CommentParser implements ParserInterface, RobotsTxtInterface |
||
21 | { |
||
22 | /** |
||
23 | * User-agent |
||
24 | * @var string |
||
25 | */ |
||
26 | private $group; |
||
27 | |||
28 | /** |
||
29 | * Comment array |
||
30 | * @var string[] |
||
31 | */ |
||
32 | private $comments = []; |
||
33 | |||
34 | /** |
||
35 | * Comment constructor. |
||
36 | * |
||
37 | * @param string $group |
||
38 | */ |
||
39 | public function __construct($group) |
||
43 | |||
44 | /** |
||
45 | * Add |
||
46 | * |
||
47 | * @param string $line |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function add($line) |
||
55 | |||
56 | /** |
||
57 | * Client |
||
58 | * |
||
59 | * @return CommentClient |
||
60 | */ |
||
61 | public function client() |
||
65 | |||
66 | /** |
||
67 | * Render |
||
68 | * |
||
69 | * @param RenderHandler $handler |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function render(RenderHandler $handler) |
||
79 | } |
||
80 |