aboutsummaryrefslogtreecommitdiff
path: root/src/Attribute/RouteAttribute.php
blob: a7b045805eee71e5f473ab9d55d19bf7233f5141 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

declare(strict_types=1);

namespace BrettParson\MiniRoute\Attribute;

/**
 * Shared contract implemented by every HTTP-method route attribute
 * (Get, Post, Put, Patch, Delete).
 *
 * The loader discovers route attributes by matching against this interface,
 * so new HTTP methods can be added as attributes without touching the loader.
 */
interface RouteAttribute
{
    public function method(): string;

    public function path(): string;
}