Source for file Context.class.php

Documentation is available at Context.class.php

  1. <?php
  2.  
  3. /**
  4. * The Context class provides easy access to variables for action scripts and classes.
  5. *
  6. * @package harmoni.architecture
  7. *
  8. * @copyright Copyright &copy; 2005, Middlebury College
  9. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  10. *
  11. * @version $Id: Context.class.php,v 1.5 2007/09/04 20:25:30 adamfranco Exp $
  12. ***/
  13. class Context {
  14. /**
  15. * @access public
  16. * @var string $sid The session name & id: "name=id"
  17. ***/
  18. var $sid;
  19. /**
  20. * @access public
  21. * @var string $hiddenFieldSID HTML containing a form <b>hidden</b> tag with the SID in it.
  22. */
  23. var $hiddenFieldSID;
  24. /**
  25. * @access public
  26. * @var string $myURL The current script's URL
  27. ***/
  28. var $myURL;
  29. /**
  30. * @access public
  31. * @var string $requestModule The module that was requested by the user.
  32. ***/
  33. var $requestModule;
  34. /**
  35. * @access public
  36. * @var string $requestAction The action requested by the user.
  37. ***/
  38. var $requestAction;
  39. /**
  40. * @access public
  41. * @var string $requestModuleDotAction The dotted-pair for module.action requested by the user.
  42. ***/
  43. var $requestModuleDotAction;
  44. /**
  45. * @access public
  46. * @var array $actionPath An array containing all actions executed so far.
  47. */
  48. var $actionPath;
  49. /**
  50. * @access private
  51. * @var object $_contextData Holds data stored for use by actions by {@link Harmoni::attachContextData()}.
  52. */
  53. // var $_contextData;
  54. /**
  55. * The constructor
  56. * @param string $module
  57. * @param string $action
  58. * @access public
  59. * @return void
  60. ***/
  61. function Context($module, $action, $execPath) {
  62. $this->sid = session_name() . "=" . session_id();
  63. $this->hiddenFieldSID = "<input type='hidden' name='".session_name()."' value='".session_id()."' />";
  64. $this->myURL = $_SERVER['PHP_SELF'];
  65. $this->requestAction = $action;
  66. $this->requestModule = $module;
  67. $this->requestModuleDotAction = "$module.$action";
  68. $this->actionPath =$execPath;
  69. // if (!$contextData) $contextData = new FieldSet();
  70. // $this->_contextData =$contextData;
  71. }
  72. }
  73.  
  74. ?>

Documentation generated on Wed, 19 Sep 2007 10:22:11 -0400 by phpDocumentor 1.3.0RC3