diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2025-04-01 14:02:25 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2025-04-01 14:02:25 +0200 |
commit | c66df4e22f914bdf3ade58099f8bd7f8521ea3a1 (patch) | |
tree | 8e79ea666900676e8f12b5a362beb6413fa9371a /lib/public/Command/Events/CommandFailedEvent.php | |
parent | b03ffab5f0f39139c71cb2b8c370ca3f3d1ad391 (diff) | |
download | nextcloud-server-feat/occ/command-events.tar.gz nextcloud-server-feat/occ/command-events.zip |
feat(occ): Emit events for command executionfeat/occ/command-events
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/public/Command/Events/CommandFailedEvent.php')
-rw-r--r-- | lib/public/Command/Events/CommandFailedEvent.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/public/Command/Events/CommandFailedEvent.php b/lib/public/Command/Events/CommandFailedEvent.php new file mode 100644 index 00000000000..0c35e08f591 --- /dev/null +++ b/lib/public/Command/Events/CommandFailedEvent.php @@ -0,0 +1,37 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +namespace OCP\Command\Events; + +use OCP\EventDispatcher\Event; + +/** + * Dispatched when an occ command failed + * + * @since 32.0.0 + */ +class CommandFailedEvent extends Event { + /** + * @since 32.0.0 + * @internal instances are created by Nextcloud server + */ + public function __construct( + private string $command, + ) { + parent::__construct(); + } + + /** + * @since 32.0.0 + */ + public function getCommand(): string { + return $this->command; + } + +} |