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:
13: namespace Xoops\Html;
14:
15: /**
16: * Img - Render an html img tag
17: *
18: * @category Xoops\Html\Img
19: * @package Xoops\Html
20: * @author Richard Griffith <richard@geekwright.com>
21: * @copyright 2014 XOOPS Project (http://xoops.org)
22: * @license GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
23: * @link http://xoops.org
24: */
25: class Img extends Attributes
26: {
27: /**
28: * __construct
29: *
30: * @param array $attributes array of attribute name => value pairs for img tag
31: */
32: public function __construct($attributes = array())
33: {
34: parent::__construct($attributes);
35: }
36:
37: /**
38: * render
39: *
40: * @return string
41: */
42: public function render()
43: {
44: $tag = '<img ' . $this->renderAttributeString() . ' />';
45:
46: return $tag;
47: }
48: }
49: