Source for file core.php

Documentation is available at core.php

  1. <?php
  2. /**
  3. * @package helpdesk
  4. * Copyright OSI 2005. All rights reserved.
  5. * It is expected that version 1.0 will be GPLed, but this interim work
  6. * is kept closed until 1.0 is ready.
  7. */
  8.  
  9. abstract class helpdeskObject
  10. {
  11. /**
  12. * initialize existing class instance from passed values
  13. *
  14. * @param object $node Node from which data is taken (always nid, the rest depending on $fromDB)
  15. * @param boolean $fromDB Is data to be taken from the DB or from $node ?
  16. * @return void
  17. */
  18. abstract function init($node, $fromDB);
  19. /**
  20. /**
  21. * implement the equivalent of hook_view for the class, but return the produced HTML
  22. * instead of modifying the node
  23. * @return string HTML for the class representation
  24. *
  25. */
  26. abstract function view();
  27. /**
  28. /**
  29. * implement the equivalent of hook_form for the class
  30. * @param object $node
  31. * @return string HTML for the class edition form
  32. *
  33. */
  34. abstract function form();
  35.  
  36. /**
  37. /**
  38. * implementation of hook_node_name for HD content objects
  39. * @return string
  40. */
  41. function node_name()
  42. {
  43.  
  44. $className = get_class($this);
  45. if (HELPDESKDEBUGALLFUNCTIONS == TRUE)
  46. { echo "<pre>HD $className::node_name ()</pre>" ; }
  47. switch ($className)
  48. {
  49. case 'helpdeskContract': $ret = HELPDESKNODECONTRACT ; break ;
  50. case 'helpdeskTicket': $ret = HELPDESKNODETICKET ; break ;
  51. case 'helpdeskFollowup': $ret = HELPDESKNODEFOLLOWUP ; break ;
  52. default:
  53. die("node_name method invoked for instance of class $className, should not happen.") ;
  54. }
  55. return $ret;
  56. }
  57. }
  58. ?>

Documentation generated on Tue, 01 Nov 2005 23:14:59 +0100 by phpDocumentor 1.3.0RC3