Source for file HarmoniObjectIterator.class.php

Documentation is available at HarmoniObjectIterator.class.php

  1. <?php
  2. require_once(OKI2."/osid/shared/ObjectIterator.php");
  3. require_once(HARMONI."oki2/shared/HarmoniIterator.class.php");
  4. /**
  5. * ObjectIterator provides access to these objects sequentially, one at a time.
  6. * The purpose of all Iterators is to to offer a way for OSID methods to
  7. * return multiple values of a common type and not use an array. Returning an
  8. * array may not be appropriate if the number of values returned is large or
  9. * is fetched remotely. Iterators do not allow access to values by index,
  10. * rather you must access values in sequence. Similarly, there is no way to go
  11. * backwards through the sequence unless you place the values in a data
  12. * structure, such as an array, that allows for access by index. To maximize
  13. * reuse and implementation substitutability, it is important not to reference
  14. * a class in one OSID implementation directly in another. Interfaces should
  15. * be used and new called only on objects in the implementation package. To
  16. * avoid binding a specific implementation of Shared to a specific
  17. * implementaiton of some other OSID, implementations TypeIterator and the
  18. * other primitative-type Iterators should reside in each OSID that requires
  19. * them and not in an implementation of Shared. For example, if an
  20. * implementation of org.osid.logging.LoggingManager needs a class that
  21. * implements org.osid.shared.StringIterator, the class should be in the
  22. * package implementing Logging.
  23. *
  24. * <p>
  25. * OSID Version: 2.0
  26. * </p>
  27. *
  28. * @package harmoni.osid_v2.shared
  29. *
  30. * @copyright Copyright &copy; 2005, Middlebury College
  31. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  32. *
  33. * @version $Id: HarmoniObjectIterator.class.php,v 1.5 2007/09/04 20:25:48 adamfranco Exp $
  34. */
  35. class HarmoniObjectIterator
  36. extends HarmoniIterator
  37. // implements ObjectIterator
  38.  
  39. {
  40. /**
  41. * Return true if there is an additional Object ; false otherwise.
  42. *
  43. * @return boolean
  44. *
  45. * @throws object SharedException An exception with one of the
  46. * following messages defined in org.osid.shared.SharedException
  47. * may be thrown: {@link }
  48. * org.osid.shared.SharedException#UNKNOWN_TYPE UNKNOWN_TYPE},
  49. * {@link org.osid.shared.SharedException#PERMISSION_DENIED}
  50. * PERMISSION_DENIED}, {@link }
  51. * org.osid.shared.SharedException#CONFIGURATION_ERROR
  52. * CONFIGURATION_ERROR}, {@link }
  53. * org.osid.shared.SharedException#UNIMPLEMENTED UNIMPLEMENTED}
  54. *
  55. * @access public
  56. */
  57. function hasNextObject () {
  58. return $this->hasNext();
  59. }
  60.  
  61. /**
  62. * Return the next Object.
  63. *
  64. * @return object mixed (original type: java.io.Serializable)
  65. *
  66. * @throws object SharedException An exception with one of the
  67. * following messages defined in org.osid.shared.SharedException
  68. * may be thrown: {@link }
  69. * org.osid.shared.SharedException#UNKNOWN_TYPE UNKNOWN_TYPE},
  70. * {@link org.osid.shared.SharedException#PERMISSION_DENIED}
  71. * PERMISSION_DENIED}, {@link }
  72. * org.osid.shared.SharedException#CONFIGURATION_ERROR
  73. * CONFIGURATION_ERROR}, {@link }
  74. * org.osid.shared.SharedException#UNIMPLEMENTED UNIMPLEMENTED},
  75. * {@link }
  76. * org.osid.shared.SharedException#NO_MORE_ITERATOR_ELEMENTS
  77. * NO_MORE_ITERATOR_ELEMENTS}
  78. *
  79. * @access public
  80. */
  81. function nextObject () {
  82. return $this->next();
  83. }
  84. }
  85.  
  86. ?>

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