1: <?php
2: /**
3: * Document for class GeoBody
4: *
5: * PHP Version 5.6
6: *
7: * @category Class
8: * @package Geolib
9: * @author Peter Pitchford <peter@geotonics.com>
10: * @license GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
11: * @link http://geotonics.com/#geolib
12: */
13:
14: /**
15: * Geo - Class to create html body tags
16: *
17: * @category Html_Tag
18: * @package Geolib
19: * @author Peter Pitchford <peter@geotonics.com>
20: * @license GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
21: * @version Release: .1
22: * @link http://geotonics.com/#geolib
23: * @since Class available since Release .1
24: */
25: class GeoBody extends GeoTag
26: {
27: private $page;
28: private $onload;
29:
30: /**
31: * Constructor for HTML body tag object
32: *
33: * @param string $page content of html body
34: * @param string $class class of html body
35: * @param string $onload javascript to run upon page load
36: * @param bool $style style of html body
37: * @param id $id id of html body
38: */
39: public function __construct($page, $class = null, $onload = null, $style = null, $id = null)
40: {
41: $atts['onload'] = $onload;
42: parent::__construct(
43: "body",
44: geoIf(GeoDebug::isOn(), div(null, 'emptyMe', 'debug')) . $page,
45: $class,
46: $id,
47: $style,
48: $atts
49: );
50: }
51:
52: /**
53: * Creates print out body tag
54: *
55: * @param string $addon Extra html to add to end of body text
56: * @param string $prepend Extra html to prepend to the body text
57: * @param bool $start Indicates that tag will be start plus content without end tag.
58: *
59: * @return text html body tag
60: */
61: public function tag($addon = null, $prepend= null, $start = null)
62: {
63: $this->text = $prepend.$this->text.$addon;
64: return parent::baseTag($start);
65: }
66: }
67: