f7cloud_client/apps/dav/lib/Avatars/RootCollection.php
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

35 lines
896 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2017-2024 F7cloud GmbH and F7cloud contributors
* SPDX-FileCopyrightText: 2017 ownCloud GmbH
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\DAV\Avatars;
use OCP\IAvatarManager;
use OCP\Server;
use Sabre\DAVACL\AbstractPrincipalCollection;
class RootCollection extends AbstractPrincipalCollection {
/**
* This method returns a node for a principal.
*
* The passed array contains principal information, and is guaranteed to
* at least contain a uri item. Other properties may or may not be
* supplied by the authentication backend.
*
* @param array $principalInfo
* @return AvatarHome
*/
public function getChildForPrincipal(array $principalInfo) {
$avatarManager = Server::get(IAvatarManager::class);
return new AvatarHome($principalInfo, $avatarManager);
}
public function getName() {
return 'avatars';
}
}