Source for file TokenCollector.abstract.php

Documentation is available at TokenCollector.abstract.php

  1. <?php
  2. /**
  3. * @package harmoni.osid_v2.authentication
  4. *
  5. * @copyright Copyright &copy; 2005, Middlebury College
  6. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  7. *
  8. * @version $Id: TokenCollector.abstract.php,v 1.2 2005/03/23 21:26:40 adamfranco Exp $
  9. */
  10.  
  11. /**
  12. * The TokenCollector is reponsible for prompting a user authentication tokens
  13. * and recieving the response from the user.
  14. *
  15. * @package harmoni.osid_v2.authentication
  16. *
  17. * @copyright Copyright &copy; 2005, Middlebury College
  18. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  19. *
  20. * @version $Id: TokenCollector.abstract.php,v 1.2 2005/03/23 21:26:40 adamfranco Exp $
  21. */
  22. class TokenCollector {
  23. /**
  24. * Run the token collection sequence involving prompting for and collecting
  25. * tokens.
  26. *
  27. * @return mixed
  28. * @access public
  29. * @since 3/18/05
  30. */
  31. function collectTokens () {
  32. if (!$tokens = $this->collect()) {
  33. $this->prompt();
  34. $tokens = $this->collect();
  35. }
  36. return $tokens;
  37. }
  38. /**
  39. * Prompt the user to supply their tokens
  40. *
  41. * @return void
  42. * @access public
  43. * @since 3/16/05
  44. */
  45. function prompt () {
  46. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  47. }
  48. /**
  49. * Collect any tokens that the user may have supplied. Reply NULL if none
  50. * are found.
  51. *
  52. * @return mixed
  53. * @access public
  54. * @since 3/16/05
  55. */
  56. function collect () {
  57. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  58. }
  59. }
  60.  
  61. ?>

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