PluginProbe
Import Social Events / 1.8.5
Import Social Events v1.8.5
1.9.1 1.9.0 trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 1.6.0 1.6.1 1.6.10 1.6.11 1.6.12 All 61 releases
import-facebook-events / includes / lib / icalcreator / src / Valarm.php

Valarm.php in Import Social Events 1.8.5, at includes/lib/icalcreator/src/Valarm.php

115 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * iCalcreator, the PHP class package managing iCal (rfc2445/rfc5445) calendar information.
4 *
5 * copyright (c) 2007-2021 Kjell-Inge Gustafsson, kigkonsult, All rights reserved
6 * Link https://kigkonsult.se
7 * Package iCalcreator
8 * Version 2.30
9 * License Subject matter of licence is the software iCalcreator.
10 * The above copyright, link, package and version notices,
11 * this licence notice and the invariant [rfc5545] PRODID result use
12 * as implemented and invoked in iCalcreator shall be included in
13 * all copies or substantial portions of the iCalcreator.
14 *
15 * iCalcreator is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License as published
17 * by the Free Software Foundation, either version 3 of the License,
18 * or (at your option) any later version.
19 *
20 * iCalcreator is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public License
26 * along with iCalcreator. If not, see <https://www.gnu.org/licenses/>.
27 *
28 * This file is a part of iCalcreator.
29 */
30
31 namespace Kigkonsult\Icalcreator;
32
33 use Exception;
34
35 use function sprintf;
36 use function strtoupper;
37
38 /**
39 * iCalcreator VALARM component class
40 *
41 * @author Kjell-Inge Gustafsson, kigkonsult <ical@kigkonsult.se>
42 * @since 2.27.4 - 2018-12-19
43 */
44 final class Valarm extends CalendarComponent
45 {
46 use Traits\ACTIONtrait,
47 Traits\ATTACHtrait,
48 Traits\ATTENDEEtrait,
49 Traits\DESCRIPTIONtrait,
50 Traits\DURATIONtrait,
51 Traits\REPEATtrait,
52 Traits\SUMMARYtrait,
53 Traits\TRIGGERtrait;
54
55 /**
56 * @var string
57 */
58 protected static $compSgn = 'a';
59
60 /**
61 * Destructor
62 *
63 * @since 2.27.3 - 2018-12-28
64 */
65 public function __destruct()
66 {
67 unset(
68 $this->compType,
69 $this->xprop,
70 $this->components,
71 $this->unparsed,
72 $this->config,
73 $this->propIx,
74 $this->propDelIx
75 );
76 unset(
77 $this->cno,
78 $this->srtk
79 );
80 unset(
81 $this->action,
82 $this->attach,
83 $this->attendee,
84 $this->description,
85 $this->duration,
86 $this->repeat,
87 $this->summary,
88 $this->trigger
89 );
90 }
91
92 /**
93 * Return formatted output for calendar component VALARM object instance
94 *
95 * @return string
96 * @throws Exception (on Duration/Trigger err)
97 * @since 2.26 - 2018-11-10
98 */
99 public function createComponent()
100 {
101 $compType = strtoupper( $this->getCompType());
102 $component = sprintf( self::$FMTBEGIN, $compType );
103 $component .= $this->createAction();
104 $component .= $this->createAttach();
105 $component .= $this->createAttendee();
106 $component .= $this->createDescription();
107 $component .= $this->createDuration();
108 $component .= $this->createRepeat();
109 $component .= $this->createSummary();
110 $component .= $this->createTrigger();
111 $component .= $this->createXprop();
112 return $component . sprintf( self::$FMTEND, $compType );
113 }
114 }
115