Source for file HarmoniAgentIterator.class.php

Documentation is available at HarmoniAgentIterator.class.php

  1. <?php
  2.  
  3. require_once(OKI2."/osid/agent/AgentIterator.php");
  4. require_once(HARMONI."oki2/shared/HarmoniIterator.class.php");
  5.  
  6. /**
  7. * AgentIterator provides access to these objects sequentially, one at a time.
  8. * The purpose of all Iterators is to to offer a way for OSID methods to
  9. * return multiple values of a common type and not use an array. Returning an
  10. * array may not be appropriate if the number of values returned is large or
  11. * is fetched remotely. Iterators do not allow access to values by index,
  12. * rather you must access values in sequence. Similarly, there is no way to go
  13. * backwards through the sequence unless you place the values in a data
  14. * structure, such as an array, that allows for access by index.
  15. *
  16. * <p>
  17. * OSID Version: 2.0
  18. * </p>
  19. *
  20. * @package harmoni.osid_v2.agent
  21. *
  22. * @copyright Copyright &copy; 2005, Middlebury College
  23. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  24. *
  25. * @version $Id: HarmoniAgentIterator.class.php,v 1.8 2007/09/04 20:25:36 adamfranco Exp $
  26. */
  27. class HarmoniAgentIterator
  28. extends HarmoniIterator
  29. // implements AgentIterator
  30.  
  31. {
  32. /**
  33. * Return true if there is an additional Agent ; false otherwise.
  34. *
  35. * @return boolean
  36. *
  37. * @throws object AgentException An exception with one of the
  38. * following messages defined in org.osid.agent.AgentException may
  39. * be thrown: {@link }
  40. * org.osid.agent.AgentException#OPERATION_FAILED
  41. * OPERATION_FAILED}, {@link }
  42. * org.osid.agent.AgentException#PERMISSION_DENIED
  43. * PERMISSION_DENIED}, {@link }
  44. * org.osid.agent.AgentException#CONFIGURATION_ERROR
  45. * CONFIGURATION_ERROR}, {@link }
  46. * org.osid.agent.AgentException#UNIMPLEMENTED UNIMPLEMENTED}
  47. *
  48. * @access public
  49. */
  50. function hasNextAgent () {
  51. return $this->hasNext();
  52. }
  53.  
  54. /**
  55. * Return the next Agent.
  56. *
  57. * @return object Agent
  58. *
  59. * @throws object AgentException An exception with one of the
  60. * following messages defined in org.osid.agent.AgentException may
  61. * be thrown: {@link }
  62. * org.osid.agent.AgentException#OPERATION_FAILED
  63. * OPERATION_FAILED}, {@link }
  64. * org.osid.agent.AgentException#PERMISSION_DENIED
  65. * PERMISSION_DENIED}, {@link }
  66. * org.osid.agent.AgentException#CONFIGURATION_ERROR
  67. * CONFIGURATION_ERROR}, {@link }
  68. * org.osid.agent.AgentException#UNIMPLEMENTED UNIMPLEMENTED},
  69. * {@link org.osid.agent.AgentException#NO_MORE_ITERATOR_ELEMENTS}
  70. * NO_MORE_ITERATOR_ELEMENTS}
  71. *
  72. * @access public
  73. */
  74. function nextAgent () {
  75. return $this->next();
  76. }
  77.  
  78. }
  79.  
  80. ?>

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