# metricool/trunk/app/Interfaces/MultiEndpointInterface.php

Metricool – Social media and site statistics, version trunk. 31 lines.

- Page: https://pluginprobe.com/plugins/metricool/trunk/code/app/Interfaces/MultiEndpointInterface.php
- Raw: https://pluginprobe.com/plugins/metricool/trunk/raw/app/Interfaces/MultiEndpointInterface.php
- Modified: 2026-08-20T14:08:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/metricool/trunk/code/app/Interfaces/MultiEndpointInterface.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Metricool\Interfaces;

/**
 * This interface can be used instead of {@see SingleEndpointInterface} to register
 * multiple routes at once. This is useful when a single route has multiple
 * endpoints.
 */
interface MultiEndpointInterface
{
    /**
     * The routes to register. For each array in the array, the key is the route
     * and the value is an array of arguments to pass to the register_rest_route
     * function: {@see EndpointManager::registerWordPressRestRoutes}.
     *
     * Arguments you can use are documented with filter: metricool_rest_routes
     * in method: {@see EndpointManager::getPluginRoutes}
     */
    public function registerRoutes(): array;

    /**
     * This method should return true if the endpoint is enabled, false
     * otherwise. Endpoint will not be registered if this method returns false:
     * {@see EndpointManager::registerEndpoints}
     */
    public function enabled(): bool;
}

```
