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\Service\Response;
15:
16: /**
17: * Qrcode service interface
18: *
19: * @category Xoops\Core\Service\Contract\QrcodeInterface
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 QrcodeInterface
29: {
30: const MODE = \Xoops\Core\Service\Manager::MODE_EXCLUSIVE;
31:
32: /**
33: * getImgUrl - get URL to QR Code image of supplied text
34: *
35: * @param Response $response \Xoops\Core\Service\Response object
36: * @param string $qrText text to encode in QR Code
37: *
38: * @return void - response->value set to URL string
39: */
40: public function getImgUrl(Response $response, $qrText);
41:
42: /**
43: * getImgTag - get a full HTML img tag to display a QR Code image of supplied text
44: *
45: * @param Response $response \Xoops\Core\Service\Response object
46: * @param string $qrText text to encode in QR Code
47: * @param array $attributes array of attribute name => value pairs for img tag
48: *
49: * @return void - response->value set to URL string
50: */
51: public function getImgTag(Response $response, $qrText, $attributes = array());
52: }
53: