Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
pool.php
1<?php
3
7
8class 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}
static resetDocs($code=null)
Definition pool.php:38
static addDoc($code, $doc)
Definition pool.php:30