/framework/core/gui/Gui.php

http://zoop.googlecode.com/ · PHP · 39 lines · 32 code · 7 blank · 0 comment · 1 complexity · db2c80963ac9ee05fc78865df0e9d8b4 MD5 · raw file

  1. <?php
  2. class Gui
  3. {
  4. private $driver;
  5. function __construct($driverName = null)
  6. {
  7. if(!$driverName)
  8. $driverName = Config::get('zoop.gui.driver');
  9. $className = 'Gui' . ucfirst($driverName);
  10. $this->driver = new $className();
  11. $this->init();
  12. }
  13. public function init()
  14. {
  15. }
  16. public function setLayout($layout)
  17. {
  18. $this->driver->setLayout($layout);
  19. }
  20. public function fetch($templateName)
  21. {
  22. return $this->driver->fetch($templateName);
  23. }
  24. public function display($templateName)
  25. {
  26. $this->driver->display($templateName);
  27. }
  28. public function assign($name, $value)
  29. {
  30. $this->driver->assign($name, $value);
  31. }
  32. }