| 1 | <?php |
||
| 20 | class VisitTimeParser implements ParserInterface, RobotsTxtInterface |
||
| 21 | { |
||
| 22 | use DirectiveParserTrait; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * VisitTime array |
||
| 26 | * @var array |
||
| 27 | */ |
||
| 28 | private $visitTimes = []; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Sorted |
||
| 32 | * @var bool |
||
| 33 | */ |
||
| 34 | private $sorted = false; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * VisitTime constructor. |
||
| 38 | */ |
||
| 39 | public function __construct() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Add |
||
| 45 | * |
||
| 46 | * @param string $line |
||
| 47 | * @return bool |
||
| 48 | */ |
||
| 49 | public function add($line) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Client |
||
| 61 | * |
||
| 62 | * @return VisitTimeClient |
||
| 63 | */ |
||
| 64 | public function client() |
||
| 69 | |||
| 70 | /** |
||
| 71 | * Sort |
||
| 72 | * |
||
| 73 | * @return bool |
||
| 74 | */ |
||
| 75 | private function sort() |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Render |
||
| 88 | * |
||
| 89 | * @param RenderHandler $handler |
||
| 90 | * @return bool |
||
| 91 | */ |
||
| 92 | public function render(RenderHandler $handler) |
||
| 100 | } |
||
| 101 |