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