# solid-performance/2.0.0/src/Performance/API/Base_Route.php

Solid Performance – Your No-Code Caching, Performance, &amp; Page Speed Solution, version 2.0.0. 61 lines.

- Page: https://pluginprobe.com/plugins/solid-performance/2.0.0/code/src/Performance/API/Base_Route.php
- Raw: https://pluginprobe.com/plugins/solid-performance/2.0.0/raw/src/Performance/API/Base_Route.php
- Modified: 2025-02-13T01:04:32+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/solid-performance/2.0.0/code/src/Performance/API/Base_Route.php#L10-L20`.

```php
<?php
/**
 * An abstract route for all other routes to extend.
 *
 * @since 0.1.0
 *
 * @package SolidWP\Performance
 */

namespace SolidWP\Performance\API;

use WP_REST_Request;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * The class that handles the clear cache route.
 *
 * @since 0.1.0
 *
 * @package SolidWP|Performance
 */
abstract class Base_Route implements Route {

	/**
	 * {@inheritdoc}
	 */
	abstract public function get_path(): string;

	/**
	 * {@inheritdoc}
	 */
	abstract public function get_methods();

	/**
	 * {@inheritdoc}
	 */
	abstract public function callback( WP_REST_Request $request );

	/**
	 * [@inheritdoc]
	 */
	abstract public function schema_callback(): array;

	/**
	 * {@inheritdoc}
	 */
	public function get_arguments(): array {
		return [];
	}

	/**
	 * {@inheritdoc}
	 */
	public function permission_callback(): bool {
		return current_user_can( 'manage_options' );
	}
}

```
