server/apps/dav/lib/Avatars/RootCollection.php
Thomas Müller 23aab05bda
Adding dav resource for avatars
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-29 00:04:29 +02:00

28 lines
626 B
PHP

<?php
namespace OCA\DAV\Avatars;
use Sabre\DAVACL\AbstractPrincipalCollection;
use Sabre\DAVACL\IPrincipal;
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 IPrincipal
*/
function getChildForPrincipal(array $principalInfo) {
return new AvatarHome($principalInfo);
}
function getName() {
return 'avatars';
}
}