1: <?php
2: /*
3: You may not change or alter any portion of this comment or credits
4: of supporting developers from this source code or any supporting source code
5: which is considered copyrighted (c) material of the original comment or credit authors.
6:
7: This program is distributed in the hope that it will be useful,
8: but WITHOUT ANY WARRANTY; without even the implied warranty of
9: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10: */
11:
12: namespace Xoops\Core\Service\Contract;
13:
14: use Xoops\Core\Kernel\Handlers\XoopsUser;
15:
16: /**
17: * Avatar service interface
18: *
19: * @category Xoops\Core\Service\Contract\AvatarInterface
20: * @package Xoops\Core
21: * @author Richard Griffith <richard@geekwright.com>
22: * @copyright 2014 The XOOPS Project https://github.com/XOOPS/XoopsCore
23: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
24: * @version Release: 1.0
25: * @link http://xoops.org
26: * @since 2.6.0
27: */
28: interface AvatarInterface
29: {
30: const MODE = \Xoops\Core\Service\Manager::MODE_EXCLUSIVE;
31:
32: /**
33: * getAvatarUrl - given user info return absolute URL to avatar image
34: *
35: * @param Response $response \Xoops\Core\Service\Response object
36: * @param mixed $userinfo XoopsUser object for user or
37: * array user info, 'uid', 'uname' and 'email' required
38: * int user uid
39: *
40: * @return void - response->value set to absolute URL to avatar image
41: */
42: public function getAvatarUrl($response, $userinfo);
43:
44: /**
45: * getAvatarEditUrl - given user info return absolute URL to edit avatar data
46: *
47: * @param Response $response \Xoops\Core\Service\Response object
48: * @param XoopsUser $userinfo XoopsUser object for user
49: *
50: * @return void - response->value set to absolute URL to editing function for avatar data
51: */
52: public function getAvatarEditUrl($response, XoopsUser $userinfo);
53: }
54: