1 | <?php |
||
12 | class DelayParser implements ParserInterface, RobotsTxtInterface |
||
13 | { |
||
14 | use DirectiveParserCommons; |
||
15 | |||
16 | /** |
||
17 | * Directive |
||
18 | * @var string |
||
19 | */ |
||
20 | private $directive; |
||
21 | |||
22 | /** |
||
23 | * Base Uri |
||
24 | * @var string |
||
25 | */ |
||
26 | private $base; |
||
27 | |||
28 | /** |
||
29 | * User-agent |
||
30 | * @var string |
||
31 | */ |
||
32 | private $userAgent; |
||
33 | |||
34 | /** |
||
35 | * Delay |
||
36 | * @var float|int |
||
37 | */ |
||
38 | private $value; |
||
39 | |||
40 | /** |
||
41 | * DelayParser constructor. |
||
42 | * |
||
43 | * @param string $base |
||
44 | * @param string $userAgent |
||
45 | * @param string $directive |
||
46 | */ |
||
47 | public function __construct($base, $userAgent, $directive) |
||
53 | |||
54 | /** |
||
55 | * Add |
||
56 | * |
||
57 | * @param float|int|string $line |
||
58 | * @return bool |
||
59 | */ |
||
60 | public function add($line) |
||
76 | |||
77 | /** |
||
78 | * Client |
||
79 | * |
||
80 | * @param float|int $fallbackValue |
||
81 | * @return DelayClient |
||
82 | */ |
||
83 | public function client($fallbackValue = 0) |
||
87 | |||
88 | /** |
||
89 | * Render |
||
90 | * |
||
91 | * @return string[] |
||
92 | */ |
||
93 | public function render() |
||
97 | } |
||
98 |