Browse
For agents
About
WP-Stateless – Google Cloud Storage
/
trunk
WP-Stateless – Google Cloud Storage
vtrunk
Switch version
4.4.3
2.1.7
2.1.8
2.1.9
2.2.0
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.2.6
2.2.7
2.3.0
2.3.1
2.3.2
3.0
3.0.1
3.0.2
3.0.3
3.0.4
3.1.0
3.1.1
3.2.0
3.2.1
3.2.2
All 62 releases
Overview
Code
wp-stateless
/
lib
/
classes
/
trait-singleton.php
trait-singleton.php
in WP-Stateless – Google Cloud Storage trunk, at lib/classes/trait-singleton.php
25 lines
364 B
Find file
t
No matching file
Up and down to move
Enter to open
Esc to close
Raw
Download
Zip
View raw
1
<
?
php
2
3
namespace
wpCloud
\
StatelessMedia
;
4
5
/**
6
* Class Singleton
7
*
@package
wpCloud\StatelessMedia
8
*/
9
trait
Singleton
{
10
11
/**
12
*
@var
null
13
*/
14
private
static
$
instance
=
null
;
15
16
/**
17
* Instance
18
*
19
*
@return
null
|
Singleton
20
*/
21
public
static
function
instance
(
)
{
22
return
self
::
$
instance
?
self
::
$
instance
:
self
::
$
instance
=
new
self
;
23
}
24
}
25