aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework/Bootstrap/EventListenerRegistration.php
blob: 92955fc412372b10e10b615ec4b54fafd171654c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */
namespace OC\AppFramework\Bootstrap;

/**
 * @psalm-immutable
 * @template-extends ServiceRegistration<\OCP\EventDispatcher\IEventListener>
 */
class EventListenerRegistration extends ServiceRegistration {
	/** @var string */
	private $event;

	/** @var int */
	private $priority;

	public function __construct(string $appId,
		string $event,
		string $service,
		int $priority) {
		parent::__construct($appId, $service);
		$this->event = $event;
		$this->priority = $priority;
	}

	/**
	 * @return string
	 */
	public function getEvent(): string {
		return $this->event;
	}

	/**
	 * @return int
	 */
	public function getPriority(): int {
		return $this->priority;
	}
}