server/apps/dav/lib/Avatars/RootCollection.php
Roeland Jago Douma f0850b266e
Fix inspection results
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-03-29 00:04:29 +02:00

29 lines
681 B
PHP

<?php
namespace OCA\DAV\Avatars;
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 = \OC::$server->getAvatarManager();
return new AvatarHome($principalInfo, $avatarManager);
}
public function getName() {
return 'avatars';
}
}