/framework/core/gui/utils.php

http://zoop.googlecode.com/ · PHP · 45 lines · 27 code · 4 blank · 14 comment · 2 complexity · 42c4a1f3425290fe8721ecd5ca2cb7b4 MD5 · raw file

  1. <?php
  2. die('this file is no longer in use')
  3. /**
  4. * Assigns a gui variable independant of a specific gui object
  5. *
  6. * often we want to assign the variables before we know what type of gui we want so store the assigns
  7. * in a global array until we create the gui
  8. *
  9. * @param string $name the key that the gui object will use to identify this variable
  10. * @param mixed $value the value that should be associated with this key
  11. */
  12. function GuiAssign($name, $value)
  13. {
  14. global $GuiVars;
  15. $GuiVars[$name] = $value;
  16. return;
  17. }
  18. /**
  19. * Returns an array of gui variables for use with rendering a page
  20. *
  21. * @return unknown
  22. */
  23. function GuiGetAssigns()
  24. {
  25. global $GuiVars;
  26. if(!$GuiVars)
  27. $GuiVars = array();
  28. return $GuiVars;
  29. }
  30. function AddTemplateDir($dir)
  31. {
  32. global $TemplateDirs;
  33. $TemplateDirs[] = $dir;
  34. }
  35. function GetTemplateDirs()
  36. {
  37. global $TemplateDirs;
  38. if(!$TemplateDirs)
  39. $TemplateDirs = array();
  40. return $TemplateDirs;
  41. }