2025-08-06 09:21:33 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
*/
|
|
|
|
|
namespace OCP\Files\Cache;
|
|
|
|
|
|
2025-08-26 11:54:13 -04:00
|
|
|
use OCP\AppFramework\Attribute\Listenable;
|
2025-08-06 09:21:33 -04:00
|
|
|
use OCP\EventDispatcher\Event;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Meta-event wrapping multiple CacheEntryRemovedEvent for when an existing
|
|
|
|
|
* entry in the cache gets removed.
|
|
|
|
|
*
|
2025-08-26 11:54:13 -04:00
|
|
|
* @since 34.0.0
|
2025-08-06 09:21:33 -04:00
|
|
|
*/
|
2025-08-26 11:54:13 -04:00
|
|
|
#[Listenable(since: '34.0.0')]
|
2025-08-06 09:21:33 -04:00
|
|
|
class CacheEntriesRemovedEvent extends Event {
|
|
|
|
|
/**
|
2025-08-26 11:54:13 -04:00
|
|
|
* @param ICacheEvent[] $cacheEntryRemovedEvents
|
2025-08-06 09:21:33 -04:00
|
|
|
*/
|
|
|
|
|
public function __construct(
|
|
|
|
|
private readonly array $cacheEntryRemovedEvents,
|
|
|
|
|
) {
|
2025-08-26 11:54:13 -04:00
|
|
|
Event::__construct();
|
2025-08-06 09:21:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2025-08-26 11:54:13 -04:00
|
|
|
* @return ICacheEvent[]
|
2025-08-06 09:21:33 -04:00
|
|
|
*/
|
|
|
|
|
public function getCacheEntryRemovedEvents(): array {
|
|
|
|
|
return $this->cacheEntryRemovedEvents;
|
|
|
|
|
}
|
|
|
|
|
}
|