Source for file HarmoniIdIterator.class.php

Documentation is available at HarmoniIdIterator.class.php

  1. <?php
  2.  
  3. require_once(OKI2."/osid/shared/IdIterator.php");
  4. require_once(HARMONI."oki2/shared/HarmoniIterator.class.php");
  5.  
  6. /**
  7. * IdIterator 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. To maximize
  15. * reuse and implementation substitutability, it is important not to reference
  16. * a class in one OSID implementation directly in another. Interfaces should
  17. * be used and new called only on objects in the implementation package. To
  18. * avoid binding a specific implementation of Shared to a specific
  19. * implementaiton of some other OSID, implementations TypeIterator and the
  20. * other primitative-type Iterators should reside in each OSID that requires
  21. * them and not in an implementation of Shared. For example, if an
  22. * implementation of org.osid.logging.LoggingManager needs a class that
  23. * implements org.osid.shared.StringIterator, the class should be in the
  24. * package implementing Logging.
  25. *
  26. * <p>
  27. * OSID Version: 2.0
  28. * </p>
  29. *
  30. * @package harmoni.osid_v2.shared
  31. *
  32. * @copyright Copyright &copy; 2005, Middlebury College
  33. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  34. *
  35. * @version $Id: HarmoniIdIterator.class.php,v 1.7 2007/09/04 20:25:48 adamfranco Exp $
  36. */
  37. class HarmoniIdIterator
  38. extends HarmoniIterator
  39. // implements IdIterator
  40.  
  41. {
  42. /**
  43. * Return true if there is an additional Id ; false otherwise.
  44. *
  45. * @return boolean
  46. *
  47. * @throws object SharedException An exception with one of the
  48. * following messages defined in org.osid.shared.SharedException
  49. * may be thrown: {@link }
  50. * org.osid.shared.SharedException#UNKNOWN_TYPE UNKNOWN_TYPE},
  51. * {@link org.osid.shared.SharedException#PERMISSION_DENIED}
  52. * PERMISSION_DENIED}, {@link }
  53. * org.osid.shared.SharedException#CONFIGURATION_ERROR
  54. * CONFIGURATION_ERROR}, {@link }
  55. * org.osid.shared.SharedException#UNIMPLEMENTED UNIMPLEMENTED}
  56. *
  57. * @access public
  58. */
  59. function hasNextId () {
  60. return $this->hasNext();
  61. }
  62.  
  63. /**
  64. * Return the next Id.
  65. *
  66. * @return object Id
  67. *
  68. * @throws object SharedException An exception with one of the
  69. * following messages defined in org.osid.shared.SharedException
  70. * may be thrown: {@link }
  71. * org.osid.shared.SharedException#UNKNOWN_TYPE UNKNOWN_TYPE},
  72. * {@link org.osid.shared.SharedException#PERMISSION_DENIED}
  73. * PERMISSION_DENIED}, {@link }
  74. * org.osid.shared.SharedException#CONFIGURATION_ERROR
  75. * CONFIGURATION_ERROR}, {@link }
  76. * org.osid.shared.SharedException#UNIMPLEMENTED UNIMPLEMENTED},
  77. * {@link }
  78. * org.osid.shared.SharedException#NO_MORE_ITERATOR_ELEMENTS
  79. * NO_MORE_ITERATOR_ELEMENTS}
  80. *
  81. * @access public
  82. */
  83. function nextId () {
  84. return $this->next();
  85. }
  86. }
  87.  
  88. ?>

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