Overview

Packages

  • Geolib

Classes

  • Geo
  • GeoBody
  • GeoCell
  • GeoDebug
  • GeoHead
  • GeoHtml
  • GeoImg
  • GeoLink
  • GeoList
  • GeoSelect
  • GeoTable
  • GeoTag

Functions

  • b
  • div
  • geoAbsLink
  • geoAnchor
  • geoBody
  • geoButton
  • geoCell
  • geoCheckbox
  • geoDb
  • geoEnd
  • geoFieldSet
  • geoForm
  • geoHead
  • geoHidden
  • geoHtml
  • geoif
  • geoIList
  • geoImg
  • geoImgSubmit
  • geoInput
  • geoIsMultiArr
  • geoItem
  • geoJSLink
  • geoLabel
  • geoLegend
  • geolib_autoloader
  • geoLink
  • geoList
  • geoMultiArr
  • geoNoScript
  • geoPassword
  • geoPre
  • geoRadio
  • geoRadios
  • geoScript
  • geoSelect
  • geoStart
  • geoSubmit
  • geoTable
  • geoTabs
  • geoTag
  • geoText
  • geoTextArea
  • geoTrace
  • geoUpload
  • geovar
  • h1
  • h2
  • h3
  • h4
  • i
  • idiv
  • ispan
  • itag
  • p
  • span
  • Overview
  • Package
  • Function
 1: <?php
 2: /**
 3:  * Document for class GeoCell
 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 table cell 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: 
26: class GeoCell extends GeoTag
27: {
28:     /**
29:      * Class constructor
30:      *
31:      * @param string $text    Content of table cell
32:      * @param int    $colspan Number of columns this table cell will span
33:      * @param int    $rowspan Number of rows this tble cell will span
34:      * @param string $class   class of table cell
35:      * @param string $valign  valign of table cell
36:      * @param string $style   style of table cell
37:      * @param string $id      id of table cell
38:      */
39:     public function __construct(
40:         $text = null,
41:         $colspan = null,
42:         $rowspan = null,
43:         $class = null,
44:         $valign = null,
45:         $style = null,
46:         $id = null
47:     ) {
48:         $this->init('td', $text, $class, $id, $style);
49:         $this->setRowSpan($rowspan);
50:         $this->setAtt("colspan", $colspan);
51:         $this->setAtt("valign", $valign);
52:     }
53:     
54:     /**
55:      * Set number of rows to span
56:      *
57:      * @param string $rowspan number of rows to span
58:      *
59:      * @return void
60:      */
61:     public function setRowSpan($rowspan)
62:     {
63:         $this->atts['rowspan'] = $rowspan;
64:     }
65:     
66:     /**
67:      * Returns HTML table cell tag
68:      *
69:      * @param string $text Content of table cell
70:      * @param string $id   id of table cell
71:      *
72:      * @return html table cell tag
73:      */
74:     public function tag($text = null, $id = null)
75:     {
76:         $this->setText($text);
77:         $this->setAtt("id", $id);
78:         return parent::baseTag();
79:     }
80: }
81: 
API documentation generated by ApiGen