You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

IAvatarManager.php 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2016, ownCloud, Inc.
  5. *
  6. * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
  7. * @author Christopher Schäpers <kondou@ts.unde.re>
  8. * @author Morris Jobke <hey@morrisjobke.de>
  9. * @author Robin McCorkell <robin@mccorkell.me.uk>
  10. * @author Roeland Jago Douma <roeland@famdouma.nl>
  11. *
  12. * @license AGPL-3.0
  13. *
  14. * This code is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU Affero General Public License, version 3,
  16. * as published by the Free Software Foundation.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU Affero General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU Affero General Public License, version 3,
  24. * along with this program. If not, see <http://www.gnu.org/licenses/>
  25. *
  26. */
  27. namespace OCP;
  28. /**
  29. * This class provides avatar functionality
  30. * @since 6.0.0
  31. */
  32. interface IAvatarManager {
  33. /**
  34. * return a user specific instance of \OCP\IAvatar
  35. * @see IAvatar
  36. * @param string $user the ownCloud user id
  37. * @return IAvatar
  38. * @throws \Exception In case the username is potentially dangerous
  39. * @throws \OCP\Files\NotFoundException In case there is no user folder yet
  40. * @since 6.0.0
  41. */
  42. public function getAvatar(string $user) : IAvatar;
  43. /**
  44. * Returns a guest user avatar instance.
  45. *
  46. * @param string $name The guest name, e.g. "Albert".
  47. * @return IAvatar
  48. * @since 16.0.0
  49. */
  50. public function getGuestAvatar(string $name): IAvatar;
  51. }