RestRoute
Attribute class as a wrapper around register_rest_route
.
- Full name:
\CEKW\WpPlugin\Attribute\RestRoute
Table of contents
Properties
Name | Type | Description |
---|---|---|
route | string | The base URL for route you are adding. |
namespace | string | The first URL segment after core prefix. Should be unique to your package/plugin. |
methods | array | The HTTP methods this route supports. |
Methods
__construct
RestRoute::__construct(string route, string namespace, array methods = ['GET'])
Parameters:
Parameter | Type | Description |
---|---|---|
route | string | Â |
namespace | string | Â |
methods | array | Â |