Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
recurrencerulepropertytype.php
1<?php
2
3
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->count)
23 {
24 $this->addParameter(Parameter::getInstance('COUNT', $this->rrule->count));
25 }
26
27 if ($this->rrule->until)
28 {
29 $this->addParameter(Parameter::getInstance('UNTIL', $this->rrule->until));
30 }
31
32 if ($this->rrule->freq)
33 {
34 $this->addParameter(Parameter::getInstance('FREQ', $this->rrule->freq));
35 }
36
37 if ($this->rrule->interval)
38 {
39 $this->addParameter(Parameter::getInstance('INTERVAL', $this->rrule->interval));
40 }
41
42 if ($this->rrule->day && is_array($this->rrule->day))
43 {
44 $this->addParameter(Parameter::getInstance('BYDAY', implode(',', $this->rrule->day), true));
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)
Definition parameter.php:13
static createInstance($names, RecurrenceRuleProperty $rrule)