PluginProbe
Redirection / 5.6.0
Redirection v5.6.0
5.10.0 5.9.0 5.8.1 5.8.0 3.7.2 3.7.3 4.0 4.0.1 4.1 4.1.1 4.2 4.2.1 4.2.2 4.2.3 4.3 4.3.1 4.3.2 4.3.3 4.4 4.4.1 4.4.2 4.5 4.5.1 4.6.2 4.7.1 All 130 releases
redirection / api / api-core.php

api-core.php in Redirection 5.6.0, at api/api-core.php

44 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class Redirection_Api {
4 /**
5 * @var Redirection_Api|null
6 */
7 private static $instance = null;
8
9 /**
10 * @var array<int, Redirection_Api_Route>
11 * @phpstan-ignore property.onlyWritten
12 */
13 private $routes = array();
14
15 /**
16 * @return Redirection_Api
17 */
18 public static function init() {
19 if ( is_null( self::$instance ) ) {
20 self::$instance = new Redirection_Api();
21 }
22
23 return self::$instance;
24 }
25
26 /**
27 * @return void
28 */
29 public function __construct() {
30 global $wpdb;
31
32 $wpdb->hide_errors();
33
34 $this->routes[] = new Redirection_Api_Redirect( REDIRECTION_API_NAMESPACE );
35 $this->routes[] = new Redirection_Api_Group( REDIRECTION_API_NAMESPACE );
36 $this->routes[] = new Redirection_Api_Log( REDIRECTION_API_NAMESPACE );
37 $this->routes[] = new Redirection_Api_404( REDIRECTION_API_NAMESPACE );
38 $this->routes[] = new Redirection_Api_Settings( REDIRECTION_API_NAMESPACE );
39 $this->routes[] = new Redirection_Api_Plugin( REDIRECTION_API_NAMESPACE );
40 $this->routes[] = new Redirection_Api_Import( REDIRECTION_API_NAMESPACE );
41 $this->routes[] = new Redirection_Api_Export( REDIRECTION_API_NAMESPACE );
42 }
43 }
44