| 1 | <?php |
||
| 11 | class Robots |
||
| 12 | { |
||
| 13 | const HEADER = 'X-Robots-Tag'; |
||
| 14 | |||
| 15 | private $allow = false; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Set whether search engines are allowed or not. |
||
| 19 | * |
||
| 20 | * @param bool $allow |
||
| 21 | */ |
||
| 22 | public function __construct($allow = false) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Execute the middleware. |
||
| 29 | * |
||
| 30 | * @param RequestInterface $request |
||
| 31 | * @param ResponseInterface $response |
||
| 32 | * @param callable $next |
||
| 33 | * |
||
| 34 | * @return ResponseInterface |
||
| 35 | */ |
||
| 36 | public function __invoke(RequestInterface $request, ResponseInterface $response, callable $next) |
||
| 60 | } |
||
| 61 |