-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclass.php
More file actions
59 lines (50 loc) · 1.19 KB
/
Copy pathclass.php
File metadata and controls
59 lines (50 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
class example {
const PI = '3.1415926535897932';
/**
* A single instance of this class.
* @var object
* @access private
* @since 1.0.0
*/
private static $_instance = null;
/**
* The version number.
* @var string
* @access public
* @since 1.0.0
*/
public $_version;
/**
* Constructor function.
* @access public
* @since 1.0.0
* @return void
*/
public function __construct( $version = '1.0.0' ) {
$this->_version = $version;
} // End __construct ()
/**
* Example function
* @access public
* @since 1.0.0
* @return void
*/
public function example_fuction() {
} // End example_fuction ()
/**
* Main class instance
*
* Ensures only one instance of this class is loaded or can be loaded.
*
* @since 1.0.0
* @static
* @return Main class instance
*/
public static function instance( $file = '', $version = '1.0.0' ) {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self( $file, $version );
}
return self::$_instance;
} // End instance ()
}