Open Monograph Press  3.3.0
GridBodyElement.inc.php
1 <?php
2 
21  var $_id;
22 
27  var $_flags;
28 
30  var $_cellProvider;
31 
35  function __construct($id = '', $cellProvider = null, $flags = array()) {
36  $this->_id = $id;
37  $this->_cellProvider = $cellProvider;
38  $this->_flags = $flags;
39  }
40 
41  //
42  // Setters/Getters
43  //
48  function getId() {
49  return $this->_id;
50  }
51 
56  function setId($id) {
57  $this->_id = $id;
58  }
59 
64  function getFlags() {
65  return $this->_flags;
66  }
67 
73  function getFlag($flag) {
74  assert(isset($this->_flags[$flag]));
75  return $this->_flags[$flag];
76  }
77 
83  function hasFlag($flag) {
84  if (!isset($this->_flags[$flag])) return false;
85  return (boolean)$this->_flags[$flag];
86  }
87 
93  function addFlag($flag, $value = true) {
94  $this->_flags[$flag] = $value;
95  }
96 
101  function getCellProvider() {
103  }
104 
109  function setCellProvider($cellProvider) {
110  $this->_cellProvider = $cellProvider;
111  }
112 }
113 
114 
GridBodyElement\$_id
$_id
Definition: GridBodyElement.inc.php:24
GridBodyElement\getId
getId()
Definition: GridBodyElement.inc.php:57
GridBodyElement\getFlag
getFlag($flag)
Definition: GridBodyElement.inc.php:82
GridBodyElement\$_flags
$_flags
Definition: GridBodyElement.inc.php:33
GridBodyElement\hasFlag
hasFlag($flag)
Definition: GridBodyElement.inc.php:92
GridBodyElement\addFlag
addFlag($flag, $value=true)
Definition: GridBodyElement.inc.php:102
GridBodyElement\setCellProvider
setCellProvider($cellProvider)
Definition: GridBodyElement.inc.php:118
GridBodyElement\__construct
__construct($id='', $cellProvider=null, $flags=array())
Definition: GridBodyElement.inc.php:44
GridBodyElement\setId
setId($id)
Definition: GridBodyElement.inc.php:65
GridBodyElement\getFlags
getFlags()
Definition: GridBodyElement.inc.php:73
GridBodyElement
Base class for grid body elements.
Definition: GridBodyElement.inc.php:16
GridBodyElement\getCellProvider
getCellProvider()
Definition: GridBodyElement.inc.php:110
GridBodyElement\$_cellProvider
$_cellProvider
Definition: GridBodyElement.inc.php:39