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: * CountryFlag service interface
18: *
19: * @category Xoops\Core\Service\Contract\CountryflagInterface
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: * @link http://xoops.org
25: */
26: interface CountryflagInterface
27: {
28: const MODE = \Xoops\Core\Service\Manager::MODE_EXCLUSIVE;
29:
30: /**
31: * getImgTag - get a full HTML tag or string to display a flag based on county code
32: *
33: * @param Response $response \Xoops\Core\Service\Response object
34: * @param string $countryCode ISO 3166-1 alpha-2 code to select flag
35: * @param array $attributes array of attribute name => value pairs for img tag
36: *
37: * @return void - response->value set to URL string
38: */
39: public function getImgTag(Response $response, $countryCode, $attributes = array());
40: }
41: