PluginProbe
Authorizer / 2.9.10
Authorizer v2.9.10
3.15.3 3.15.2 3.15.1 3.15.0 3.14.3 3.14.4 3.14.2 3.14.1 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.9.0 2.9.1 2.9.10 2.9.11 2.9.12 2.9.13 2.9.2 2.9.3 2.9.6 All 126 releases
authorizer / src / authorizer / abstract-class-static-instance.php

abstract-class-static-instance.php in Authorizer 2.9.10, at src/authorizer/abstract-class-static-instance.php

41 lines 760 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 /**
3 * Authorizer
4 *
5 * @license GPL-2.0+
6 * @link https://github.com/uhm-coe/authorizer
7 * @package authorizer
8 */
9
10 namespace Authorizer;
11
12 /**
13 * Base class that all other classes extend (provides static accessor variable).
14 */
15 abstract class Static_Instance {
16 /**
17 * Plugin instance.
18 *
19 * @var object Plugin instance.
20 */
21 protected static $instance = null;
22
23
24 /**
25 * Access this plugin's working instance.
26 *
27 * @return object Object of this class.
28 */
29 public static function get_instance() {
30 return null === static::$instance ? new static() : static::$instance;
31 }
32
33
34 /**
35 * Constructor intentionally left empty and public.
36 */
37 public function __construct() {
38 }
39
40 }
41