RestRoute

Attribute class as a wrapper around register_rest_route.

  • Full name: \CEKW\WpPlugin\Attribute\RestRoute
Table of contents
  1. Properties
  2. Methods
    1. __construct

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 Â