Source for file HarmoniQualifierIterator.class.php

Documentation is available at HarmoniQualifierIterator.class.php

  1. <?php
  2.  
  3. require_once(OKI2."/osid/authorization/QualifierIterator.php");
  4. require_once(HARMONI."oki2/shared/HarmoniIterator.class.php");
  5. /**
  6. * QualifierIterator is the iterator for a collection of Qualifiers.
  7. *
  8. * <p>
  9. * OSID Version: 2.0
  10. * </p>
  11. *
  12. * @package harmoni.osid_v2.authorization
  13. *
  14. * @copyright Copyright &copy; 2005, Middlebury College
  15. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  16. *
  17. * @version $Id: HarmoniQualifierIterator.class.php,v 1.8 2007/09/04 20:25:38 adamfranco Exp $
  18. */
  19. class HarmoniQualifierIterator
  20. extends HarmoniIterator
  21. // implements QualifierIterator
  22.  
  23. {
  24. /**
  25. * Return true if there is an additional Qualifier ; false otherwise.
  26. *
  27. * @return boolean
  28. *
  29. * @throws object AuthorizationException An exception with
  30. * one of the following messages defined in
  31. * org.osid.authorization.AuthorizationException may be thrown:
  32. * {@link }
  33. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  34. * OPERATION_FAILED}, {@link }
  35. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  36. * PERMISSION_DENIED}, {@link }
  37. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  38. * CONFIGURATION_ERROR}, {@link }
  39. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  40. * UNIMPLEMENTED}
  41. *
  42. * @access public
  43. */
  44. function hasNextQualifier () {
  45. return $this->hasNext();
  46. }
  47.  
  48. /**
  49. * Return the next Qualifier.
  50. *
  51. * @return object Qualifier
  52. *
  53. * @throws object AuthorizationException An exception with
  54. * one of the following messages defined in
  55. * org.osid.authorization.AuthorizationException may be thrown:
  56. * {@link }
  57. * org.osid.authorization.AuthorizationException#OPERATION_FAILED
  58. * OPERATION_FAILED}, {@link }
  59. * org.osid.authorization.AuthorizationException#PERMISSION_DENIED
  60. * PERMISSION_DENIED}, {@link }
  61. * org.osid.authorization.AuthorizationException#CONFIGURATION_ERROR
  62. * CONFIGURATION_ERROR}, {@link }
  63. * org.osid.authorization.AuthorizationException#UNIMPLEMENTED
  64. * UNIMPLEMENTED}
  65. *
  66. * @access public
  67. */
  68. function nextQualifier () {
  69. return $this->next();
  70. }
  71. /**
  72. * Return the next Qualifier.
  73. *
  74. * @return object Qualifier
  75. *
  76. * @throws object HierarchyException An exception with one of
  77. * the following messages defined in
  78. * org.osid.hierarchy.HierarchyException may be thrown: {@link }
  79. * org.osid.hierarchy.HierarchyException#OPERATION_FAILED
  80. * OPERATION_FAILED}, {@link }
  81. * org.osid.hierarchy.HierarchyException#PERMISSION_DENIED
  82. * PERMISSION_DENIED}, {@link }
  83. * org.osid.hierarchy.HierarchyException#CONFIGURATION_ERROR
  84. * CONFIGURATION_ERROR}, {@link }
  85. * org.osid.hierarchy.HierarchyException#UNIMPLEMENTED
  86. * UNIMPLEMENTED}, {@link }
  87. * org.osid.hierarchy.HierarchyException#NO_MORE_ITERATOR_ELEMENTS
  88. * NO_MORE_ITERATOR_ELEMENTS}
  89. *
  90. * @access public
  91. */
  92. function next () {
  93. // If this is the first element access, inform our AZ cache that we are
  94. // working with this set of nodes so that it can fetch AZs for all of
  95. // them at once.
  96. if ($this->_i == -1) {
  97. $isAuthorizedCache = IsAuthorizedCache::instance();
  98. $isAuthorizedCache->queueAssetArray($this->_elements);
  99. }
  100. return parent::next();
  101. }
  102. }
  103.  
  104. ?>

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