Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
pool.php
1
<?php
2
namespace
Bitrix\Sale\Cashbox\Internals
;
3
4
use
Bitrix\Sale\Cashbox\CheckManager
;
5
use
Bitrix\Sale\Cashbox\Manager
;
6
use
Bitrix\Sale\Result
;
7
8
class
Pool
9
{
10
protected
static
$docs
= array();
11
16
public
static
function
getDocs
($code)
17
{
18
if
(isset(static::$docs[$code]))
19
{
20
return
static::$docs[$code];
21
}
22
23
return
null
;
24
}
25
30
public
static
function
addDoc
($code, $doc)
31
{
32
static::$docs[$code][] = $doc;
33
}
34
38
public
static
function
resetDocs
($code =
null
)
39
{
40
if
($code !==
null
)
41
{
42
unset(static::$docs[$code]);
43
}
44
else
45
{
46
static::$docs = array();
47
}
48
}
49
54
public
static
function
generateChecks
($code)
55
{
56
$result =
new
Result
();
57
58
$docs
= static::getDocs($code);
59
if
(!
$docs
)
60
return
$result;
61
62
$result = CheckManager::addChecks(
$docs
);
63
64
static::resetDocs($code);
65
66
return
$result;
67
}
68
}
Bitrix\Main\DB\Result
Definition
result.php:19
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Sale\Cashbox\CheckManager
Definition
checkmanager.php:24
Bitrix\Sale\Cashbox\Internals\Pool
Definition
pool.php:9
Bitrix\Sale\Cashbox\Internals\Pool\$docs
static $docs
Definition
pool.php:10
Bitrix\Sale\Cashbox\Internals\Pool\resetDocs
static resetDocs($code=null)
Definition
pool.php:38
Bitrix\Sale\Cashbox\Internals\Pool\getDocs
static getDocs($code)
Definition
pool.php:16
Bitrix\Sale\Cashbox\Internals\Pool\generateChecks
static generateChecks($code)
Definition
pool.php:54
Bitrix\Sale\Cashbox\Internals\Pool\addDoc
static addDoc($code, $doc)
Definition
pool.php:30
Bitrix\Sale\Cashbox\Manager
Definition
manager.php:22
Bitrix\Sale\Cashbox\Internals
modules
sale
lib
cashbox
internals
pool.php
Создано системой
1.10.0