1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
recurrencerulepropertytype.php
См. документацию.
1<?php
2
3
4namespace Bitrix\Calendar\ICal\Basic;
5
6
8{
9 private $rrule;
10
12 {
13 return new self($names, $rrule);
14 }
15
16 public function __construct($names, RecurrenceRuleProperty $rrule)
17 {
18 parent::__construct($names);
19
20 $this->rrule = $rrule;
21
22 if ($this->rrule->freq)
23 {
24 $this->addParameter(Parameter::getInstance('FREQ', $this->rrule->freq));
25 }
26
27 if ($this->rrule->interval)
28 {
29 $this->addParameter(Parameter::getInstance('INTERVAL', $this->rrule->interval));
30 }
31
32 if ($this->rrule->day && is_array($this->rrule->day))
33 {
34 $this->addParameter(Parameter::getInstance('BYDAY', implode(',', $this->rrule->day), true));
35 }
36
37 if ($this->rrule->count)
38 {
39 $this->addParameter(Parameter::getInstance('COUNT', $this->rrule->count));
40 }
41
42 if ($this->rrule->until)
43 {
44 $this->addParameter(Parameter::getInstance('UNTIL', $this->rrule->until));
45 }
46 }
47
48 public function getValue(): string
49 {
50 return "";
51 }
52
54 {
55 return $this->rrule;
56 }
57}
static getInstance(string $name, string $value, $disableEscaping=false)
Определения parameter.php:13
addParameter(Parameter $parameter)
Определения propertytype.php:54
static createInstance($names, RecurrenceRuleProperty $rrule)
Определения recurrencerulepropertytype.php:11
__construct($names, RecurrenceRuleProperty $rrule)
Определения recurrencerulepropertytype.php:16