| 1 | <?php | ||
| 12 | class RobotVersionParser implements ParserInterface, RobotsTxtInterface | ||
| 13 | { | ||
| 14 | /** | ||
| 15 | * RobotVersion value | ||
| 16 | * @var float|int|string | ||
| 17 | */ | ||
| 18 | private $robotVersion; | ||
| 19 | |||
| 20 | /** | ||
| 21 | * RobotVersionParser constructor. | ||
| 22 | */ | ||
| 23 | public function __construct() | ||
| 26 | |||
| 27 | /** | ||
| 28 | * Add | ||
| 29 | * | ||
| 30 | * @param float|int|string $line | ||
| 31 | * @return bool | ||
| 32 | */ | ||
| 33 | public function add($line) | ||
| 34 |     { | ||
| 35 |         if (!empty($this->robotVersion)) { | ||
| 36 | return false; | ||
| 37 | } | ||
| 38 | $this->robotVersion = $line; | ||
| 39 | return true; | ||
| 40 | } | ||
| 41 | |||
| 42 | /** | ||
| 43 | * Client | ||
| 44 | * | ||
| 45 | * @return RobotVersionClient | ||
| 46 | */ | ||
| 47 | public function client() | ||
| 51 | |||
| 52 | /** | ||
| 53 | * Render | ||
| 54 | * | ||
| 55 | * @return string[] | ||
| 56 | */ | ||
| 57 | public function render() | ||
| 61 | } | ||
| 62 |