index/src/Http/Routing/HttpOptions.php

19 lines
410 B
PHP

<?php
// HttpOptions.php
// Created: 2024-03-28
// Updated: 2024-03-28
namespace Index\Http\Routing;
use Attribute;
/**
* Provides an attribute for marking methods in a class as a OPTIONS route.
*/
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
class HttpOptions extends HttpRoute {
public function __construct(string $path) {
parent::__construct('OPTIONS', $path);
}
}