1<?php 2 3declare(strict_types=1); 4/** 5 * @copyright Copyright (c) 2019 Joas Schilling <coding@schilljs.com> 6 * 7 * @license GNU AGPL version 3 or any later version 8 * 9 * This program is free software: you can redistribute it and/or modify 10 * it under the terms of the GNU Affero General Public License as 11 * published by the Free Software Foundation, either version 3 of the 12 * License, or (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU Affero General Public License for more details. 18 * 19 * You should have received a copy of the GNU Affero General Public License 20 * along with this program. If not, see <http://www.gnu.org/licenses/>. 21 * 22 */ 23 24namespace OCA\Talk\Events; 25 26use OCA\Talk\Room; 27 28class VerifyRoomPasswordEvent extends RoomEvent { 29 30 /** @var string */ 31 protected $password; 32 /** @var bool|null */ 33 protected $isPasswordValid; 34 /** @var string */ 35 protected $redirectUrl = ''; 36 37 38 public function __construct(Room $room, 39 string $password) { 40 parent::__construct($room); 41 $this->password = $password; 42 } 43 44 public function getPassword(): string { 45 return $this->password; 46 } 47 48 public function setIsPasswordValid(bool $isPasswordValid): void { 49 $this->isPasswordValid = $isPasswordValid; 50 } 51 52 public function isPasswordValid(): ?bool { 53 return $this->isPasswordValid; 54 } 55 56 public function setRedirectUrl(string $redirectUrl): void { 57 $this->redirectUrl = $redirectUrl; 58 } 59 60 public function getRedirectUrl(): string { 61 return $this->redirectUrl; 62 } 63} 64