1: <?php
2: /**
3: * This file contains the cHTMLIFrame class.
4: *
5: * @package Core
6: * @subpackage GUI_HTML
7: * @version SVN Revision $Rev:$
8: *
9: * @author Simon Sprankel
10: * @copyright four for business AG <www.4fb.de>
11: * @license http://www.contenido.org/license/LIZENZ.txt
12: * @link http://www.4fb.de
13: * @link http://www.contenido.org
14: */
15:
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17:
18: /**
19: * cHTMLIFrame class represents an iframe.
20: *
21: * @package Core
22: * @subpackage GUI_HTML
23: */
24: class cHTMLIFrame extends cHTML {
25:
26: /**
27: * Creates an HTML iframe element.
28: */
29: public function __construct() {
30: parent::__construct();
31: $this->_contentlessTag = false;
32: $this->_tag = 'iframe';
33: }
34:
35: /**
36: * Sets this frame's source
37: *
38: * @param string|object $content String with the content or an object to
39: * render.
40: * @return cHTMLIFrame $this
41: */
42: public function setSrc($src) {
43: return $this->updateAttribute('src', $src);
44: }
45:
46: /**
47: * Sets this frame's width
48: *
49: * @param string $width Width of the item
50: * @return cHTMLIFrame $this
51: */
52: public function setWidth($width) {
53: return $this->updateAttribute('width', $width);
54: }
55:
56: /**
57: * Sets this frame's height
58: *
59: * @param string $height Height of the item
60: * @return cHTMLIFrame $this
61: */
62: public function setHeight($height) {
63: return $this->updateAttribute('height', $height);
64: }
65:
66: /**
67: * Sets wether this iframe should have a border or not
68: *
69: * @param string $border If 1 or true, this frame will have a border
70: * @return cHTMLIFrame $this
71: */
72: public function setBorder($border) {
73: return $this->updateAttribute('frameborder', intval($border));
74: }
75:
76: }
77: