Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
singletontrait.php
1
<?php
2
3
namespace
Bitrix\Calendar\Internals
;
4
5
use
Bitrix\Calendar\Core\Base\BaseException
;
6
7
trait SingletonTrait
8
{
12
protected
static
$instance =
null
;
13
17
public
static
function
getInstance()
18
{
19
if
(static::$instance ===
null
)
20
{
21
static::$instance =
new
static
();
22
}
23
24
return
static::$instance;
25
}
26
27
28
protected
function
__construct
(){}
29
33
public
function
__wakeup
()
34
{
35
throw
new
BaseException
(
"Trying to wake singleton up"
);
36
}
37
protected
function
__clone
(){}
38
}
Bitrix\Calendar\Core\Base\BaseException
Definition
baseexception.php:8
Bitrix\Calendar\Internals
Definition
access.php:3
Bitrix\Calendar\Internals\__construct
__construct()
Definition
singletontrait.php:28
Bitrix\Calendar\Internals\__wakeup
__wakeup()
Definition
singletontrait.php:33
Bitrix\Calendar\Internals\__clone
__clone()
Definition
singletontrait.php:37
modules
calendar
lib
internals
singletontrait.php
Создано системой
1.10.0