| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Metricool\Interfaces; |
| 6 |
|
| 7 |
interface SingleEndpointInterface |
| 8 |
{ |
| 9 |
/** |
| 10 |
* The route name to register. Will be used as the array key for routes |
| 11 |
* array in: {@see EndpointManager::registerWordPressRestRoutes} |
| 12 |
*/ |
| 13 |
public function registerRoute(): string; |
| 14 |
|
| 15 |
/** |
| 16 |
* Arguments you can use are documented wih filter: metricool_rest_routes |
| 17 |
* in method: {@see EndpointManager::getPluginRoutes} |
| 18 |
*/ |
| 19 |
public function registerArguments(): array; |
| 20 |
|
| 21 |
/** |
| 22 |
* This method should return true if the endpoint is enabled, false |
| 23 |
* otherwise. Endpoint will not be registered if this method returns false: |
| 24 |
* {@see EndpointManager::registerEndpoints} |
| 25 |
*/ |
| 26 |
public function enabled(): bool; |
| 27 |
} |
| 28 |
|