2023-05-21 23:05:40 +02:00
|
|
|
<?php
|
2024-05-16 17:33:30 +02:00
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2023-05-21 23:05:40 +02:00
|
|
|
/**
|
2024-05-23 09:26:56 +02:00
|
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-05-21 23:05:40 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace OC;
|
|
|
|
|
|
|
|
use OCP\IEventSource;
|
|
|
|
use OCP\IEventSourceFactory;
|
|
|
|
use OCP\IRequest;
|
|
|
|
|
|
|
|
class EventSourceFactory implements IEventSourceFactory {
|
2024-05-16 17:25:13 +02:00
|
|
|
public function __construct(
|
|
|
|
private IRequest $request,
|
|
|
|
) {
|
2023-05-21 23:05:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function create(): IEventSource {
|
2024-05-16 17:25:13 +02:00
|
|
|
return new EventSource($this->request);
|
2023-05-21 23:05:40 +02:00
|
|
|
}
|
|
|
|
}
|