Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
CommitOptions.php
1<?php
2
4
6{
7 protected string $moduleId = '';
8 protected string $savePath = '';
9 protected bool $forceRandom = true;
10 protected bool $skipExtension = false;
11 protected string $addDirectory = '';
12
13 public function __construct(array $options = [])
14 {
15 $optionNames = [
16 'moduleId',
17 'savePath',
18 'forceRandom',
19 'skipExtension',
20 'addDirectory',
21 ];
22
23 foreach ($optionNames as $optionName)
24 {
25 if (array_key_exists($optionName, $options))
26 {
27 $optionValue = $options[$optionName];
28 $setter = 'set' . ucfirst($optionName);
29 $this->$setter($optionValue);
30 }
31 }
32 }
33
34 public function getModuleId(): string
35 {
36 return $this->moduleId;
37 }
38
39 public function setModuleId(string $moduleId): self
40 {
41 $this->moduleId = $moduleId;
42
43 return $this;
44 }
45
46 public function getSavePath(): string
47 {
48 return $this->savePath;
49 }
50
51 public function setSavePath(string $savePath): self
52 {
53 $this->savePath = $savePath;
54
55 return $this;
56 }
57
58 public function isForceRandom(): bool
59 {
60 return $this->forceRandom;
61 }
62
63 public function setForceRandom(bool $forceRandom): self
64 {
65 $this->forceRandom = $forceRandom;
66
67 return $this;
68 }
69
70 public function isSkipExtension(): bool
71 {
73 }
74
75 public function setSkipExtension(bool $skipExtension): self
76 {
77 $this->skipExtension = $skipExtension;
78
79 return $this;
80 }
81
82 public function getAddDirectory(): string
83 {
85 }
86
87 public function setAddDirectory(string $addDirectory): self
88 {
89 $this->addDirectory = $addDirectory;
90
91 return $this;
92 }
93}
setAddDirectory(string $addDirectory)