Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
roombuilderfromarray.php
1<?php
2
4
6{
10 private array $params;
11
15 public function __construct(array $params)
16 {
17 $params = [
18 'ID' => $params['ID'] ?? null,
19 'LOCATION_ID' => $params['LOCATION_ID'] ?? null,
20 'CAPACITY' => $params['CAPACITY'] ?? null,
21 'NECESSITY' => $params['NECESSITY'] ?? null,
22 'NAME' => $params['NAME'] ?? null,
23 'COLOR' => $params['COLOR'] ?? null,
24 'OWNER_ID' => $params['OWNER_ID'] ?? null,
25 'ACCESS' => $params['ACCESS'] ?? null,
26 'CATEGORY_ID' => $params['CATEGORY_ID'] ?? null,
27 ];
28 $this->params = $params;
29 }
30
31 function getId(): int
32 {
33 return (int)$this->params['ID'];
34 }
35
36 function getLocationId(): int
37 {
38 return (int)$this->params['LOCATION_ID'];
39 }
40
41 function getCapacity()
42 {
43 return $this->params['CAPACITY'];
44 }
45
46 function getNecessity()
47 {
48 return $this->params['NECESSITY'];
49 }
50
51 function getName()
52 {
53 return $this->params['NAME'];
54 }
55
56 function getColor()
57 {
58 return $this->params['COLOR'];
59 }
60
61 function getOwnerId(): int
62 {
63 return (int)$this->params['OWNER_ID'];
64 }
65
66 function getAccess()
67 {
68 return $this->params['ACCESS'];
69 }
70
71 function getCategoryId(): int
72 {
73 return (int)$this->params['CATEGORY_ID'];
74 }
75}