| 1 | <?php |
||
| 12 | class RequestRate implements DirectiveInterface, RobotsTxtInterface |
||
| 13 | { |
||
| 14 | use Toolbox; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Directive |
||
| 18 | */ |
||
| 19 | const DIRECTIVE = self::DIRECTIVE_REQUEST_RATE; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * RequestRate array |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | protected $array = []; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * RequestRate constructor. |
||
| 29 | */ |
||
| 30 | public function __construct() |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Add |
||
| 36 | * |
||
| 37 | * @param string $line |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | public function add($line) |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Export rules |
||
| 60 | * |
||
| 61 | * @return string[][] |
||
| 62 | */ |
||
| 63 | public function export() |
||
| 67 | |||
| 68 | /** |
||
| 69 | * Render |
||
| 70 | * |
||
| 71 | * @return string[] |
||
| 72 | */ |
||
| 73 | public function render() |
||
| 88 | } |
||
| 89 |