PluginProbe
Parse.ly / 3.23.6
Parse.ly v3.23.6
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 / stats / class-stats-controller.php

class-stats-controller.php in Parse.ly 3.23.6, at src/rest-api/stats/class-stats-controller.php

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