View.php 348 B

123456789101112131415161718192021222324252627
  1. <?php
  2. class View {
  3. var $_data;
  4. function __construct() {
  5. $this->_data = array();
  6. }
  7. function set($key, $value) {
  8. $this->_data[$key] = $value;
  9. }
  10. function get($key) {
  11. return (array_key_exists($key, $this->_data))? $this->_data[$key] : '';
  12. }
  13. /**
  14. * Overwrite this method.
  15. */
  16. function render() {
  17. $out = '';
  18. return $out;
  19. }
  20. }