PluginProbe
Parse.ly / 3.23.7
Parse.ly v3.23.7
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
wp-parsely / src / rest-api / utils / class-utils-controller.php

class-utils-controller.php in Parse.ly 3.23.7, at src/rest-api/utils/class-utils-controller.php

48 lines 812 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * API Utils Controller
4 *
5 * @package Parsely
6 * @since 3.20.5
7 */
8
9 declare(strict_types=1);
10
11 namespace Parsely\REST_API\Utils;
12
13 use Parsely\REST_API\REST_API_Controller;
14 use Parsely\REST_API\Utils\Endpoint_Post;
15
16 /**
17 * The Utils API Controller.
18 *
19 * Used to define the namespace, version, and endpoints for the Utils API.
20 *
21 * @since 3.20.5
22 */
23 class Utils_Controller extends REST_API_Controller {
24 /**
25 * Gets the prefix for this API route.
26 *
27 * @since 3.20.5
28 *
29 * @return string The namespace.
30 */
31 public static function get_route_prefix(): string {
32 return 'utils';
33 }
34
35 /**
36 * Initializes the Utils API endpoints.
37 *
38 * @since 3.20.5
39 */
40 public function init(): void {
41 $endpoints = array(
42 new Endpoint_Post( $this ),
43 );
44
45 $this->register_endpoints( $endpoints );
46 }
47 }
48