0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-03 21:40:31 +00:00
nextcloud_server/apps/dav/lib/Avatars/RootCollection.php
Côme Chilliet 64863c9d46
chore: Apply new rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-02-13 11:46:42 +01:00

33 lines
899 B
PHP

<?php
/**
* SPDX-FileCopyrightText: 2017-2024 Nextcloud GmbH and Nextcloud 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';
}
}