/framework/core/gui/GuiSmarty3.php

http://zoop.googlecode.com/ · PHP · 41 lines · 19 code · 7 blank · 15 comment · 1 complexity · 5898b7616b0de3a29460b35f92e57ddf MD5 · raw file

  1. <?php
  2. /**
  3. * Object extends the Smarty templating system to allow easy separation of business and
  4. * presentation logic
  5. *
  6. */
  7. class GuiSmarty3 extends Smarty
  8. {
  9. function __construct()
  10. {
  11. $config = GuiModule::sGetConfig();
  12. $tmpPath = Zoop::getTmpDir();
  13. // call the parent contructor
  14. parent::__construct();
  15. $this->template_dir = array();
  16. // set the default for the base template dir
  17. // this should be using the new config stuff, not defines
  18. if(!defined("gui_template_dir") )
  19. define("gui_template_dir", app_dir . "/templates");
  20. // set the standard template directory and any others registerd with zoop
  21. $this->addTemplateDir(gui_template_dir);
  22. // set the compile directory
  23. $this->setCompileDir($tmpPath . "/smarty2");
  24. // set the cache_dir directory
  25. // what does this even do? I'm pretty sure that is not set up
  26. $this->setCacheDir($tmpPath . "/guicache");
  27. // set the config directory
  28. // what does this even do? I'm pretty sure that is not set up
  29. $this->setConfigDir(app_dir . "/guiconfig");
  30. // set the plugin directories
  31. $this->addPluginsDir(dirname(__file__) . '/plugins'); // one for plugins added into gui
  32. $this->addPluginsDir(app_dir . "/guiplugins"); // one or plugins specific to the app
  33. }
  34. }