1<?php
2
3declare(strict_types=1);
4
5/**
6 * @copyright Copyright (c) 2020, Georg Ehrke
7 *
8 * @author Georg Ehrke <oc.list@georgehrke.com>
9 *
10 * @license GNU AGPL version 3 or any later version
11 *
12 * This program is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Affero General Public License as
14 * published by the Free Software Foundation, either version 3 of the
15 * License, or (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Affero General Public License for more details.
21 *
22 * You should have received a copy of the GNU Affero General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *
25 */
26namespace OCA\DAV\Events;
27
28use OCP\EventDispatcher\Event;
29
30/**
31 * Class CalendarPublishedEvent
32 *
33 * @package OCA\DAV\Events
34 * @since 20.0.0
35 */
36class CalendarPublishedEvent extends Event {
37
38	/** @var int */
39	private $calendarId;
40
41	/** @var array */
42	private $calendarData;
43
44	/** @var string */
45	private $publicUri;
46
47	/**
48	 * CalendarPublishedEvent constructor.
49	 *
50	 * @param int $calendarId
51	 * @param array $calendarData
52	 * @param string $publicUri
53	 * @since 20.0.0
54	 */
55	public function __construct(int $calendarId,
56								array $calendarData,
57								string $publicUri) {
58		parent::__construct();
59		$this->calendarId = $calendarId;
60		$this->calendarData = $calendarData;
61		$this->publicUri = $publicUri;
62	}
63
64	/**
65	 * @return int
66	 * @since 20.0.0
67	 */
68	public function getCalendarId(): int {
69		return $this->calendarId;
70	}
71
72	/**
73	 * @return array
74	 * @since 20.0.0
75	 */
76	public function getCalendarData(): array {
77		return $this->calendarData;
78	}
79
80	/**
81	 * @return string
82	 * @since 20.0.0
83	 */
84	public function getPublicUri(): string {
85		return $this->publicUri;
86	}
87}
88