Source for file HarmoniStringIterator.class.php

Documentation is available at HarmoniStringIterator.class.php

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

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