PluginProbe
Metricool – Social media and site statistics / 2.1.1
Metricool – Social media and site statistics v2.1.1
2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
← All changes | app/Interfaces/SingleEndpointInterface.php +27 -0 2.0.0 → 2.1.1 View file →
@@ -1,0 +1,27 @@
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 +}