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.7KB

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