HttpPut
extends HttpRoute
in package
Provides an attribute for marking methods in a class as a PUT route.
Attributes
- #[Attribute]
- \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE
Table of Contents
Methods
- __construct() : mixed
- getMethod() : string
- Returns the target method name.
- getPath() : string
- Returns the target path.
- register() : void
- Reads attributes from methods in a RouteHandler instance and registers them to a given Router instance.
Methods
__construct()
public
__construct(string $path) : mixed
Parameters
- $path : string
-
Path this route represents.
getMethod()
Returns the target method name.
public
getMethod() : string
Return values
stringgetPath()
Returns the target path.
public
getPath() : string
Return values
stringregister()
Reads attributes from methods in a RouteHandler instance and registers them to a given Router instance.
public
static register(Router $router, RouteHandler $handler) : void
Parameters
- $router : Router
-
Router instance.
- $handler : RouteHandler
-
Handler instance.