Source for file StringIterator.php

Documentation is available at StringIterator.php

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

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