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 CalendarUpdatedEvent 32 * 33 * @package OCA\DAV\Events 34 * @since 20.0.0 35 */ 36class CalendarUpdatedEvent extends Event { 37 38 /** @var int */ 39 private $calendarId; 40 41 /** @var array */ 42 private $calendarData; 43 44 /** @var array */ 45 private $shares; 46 47 /** @var array */ 48 private $mutations; 49 50 /** 51 * CalendarUpdatedEvent constructor. 52 * 53 * @param int $calendarId 54 * @param array $calendarData 55 * @param array $shares 56 * @param array $mutations 57 * @since 20.0.0 58 */ 59 public function __construct(int $calendarId, 60 array $calendarData, 61 array $shares, 62 array $mutations) { 63 parent::__construct(); 64 $this->calendarId = $calendarId; 65 $this->calendarData = $calendarData; 66 $this->shares = $shares; 67 $this->mutations = $mutations; 68 } 69 70 /** 71 * @return int 72 * @since 20.0.0 73 */ 74 public function getCalendarId(): int { 75 return $this->calendarId; 76 } 77 78 /** 79 * @return array 80 * @since 20.0.0 81 */ 82 public function getCalendarData(): array { 83 return $this->calendarData; 84 } 85 86 /** 87 * @return array 88 * @since 20.0.0 89 */ 90 public function getShares(): array { 91 return $this->shares; 92 } 93 94 /** 95 * @return array 96 * @since 20.0.0 97 */ 98 public function getMutations(): array { 99 return $this->mutations; 100 } 101} 102