Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
parserpropertytype.php
1<?php
2
3
5
6
8{
12 private $value;
16 private $name;
20 private $parameters;
21
26 public static function createInstance(string $name): ParserPropertyType
27 {
28 return new self($name);
29 }
30
31 public function __construct($name)
32 {
33 $this->name = $name;
34 }
35
39 public function getValue(): ?string
40 {
41 return $this->value;
42 }
43
47 public function getOriginalValue(): ?string
48 {
49 return $this->value;
50 }
51
52 public function getName(): string
53 {
54 return $this->name;
55 }
56
61 public function setValue(?string $value): ParserPropertyType
62 {
63 $this->value = $value;
64
65 return $this;
66 }
67
72 public function addParameters(array $parameters): ParserPropertyType
73 {
74 foreach ($parameters as $key => $parameter)
75 {
76 $this->addParameter($key, $parameter);
77 }
78
79 return $this;
80 }
81
87 public function addParameter(string $key, string $parameter): ParserPropertyType
88 {
89 $this->parameters[$key] = $parameter;
90
91 return $this;
92 }
93
94 public function getParameterValueByName(string $name): ?string
95 {
96 return $this->parameters[$name] ?? null;
97 }
98}