Source for file OsidManager.php

Documentation is available at OsidManager.php

  1. <?php
  2. /**
  3. * OsidManager is the key to binding an application to an OSID implementation.
  4. * An OSID is required to define an interface that extends OsidManager. The
  5. * OSID implementation is required to have a class that implements its
  6. * OsidManager. The application loads an OSID implementation by using the
  7. * OsidLoader to get an instance of the OSID's OsidManager. The application
  8. * accesses all OSID objects directly or indirectly through the OSID's
  9. * OsidManager.
  10. *
  11. * <p>
  12. * OsidManager defines three methods: getOsidContext, assignOsidContext,
  13. * assignConfiguration. The assign methods are called by the
  14. * OsidLoader.getManager method. An application can use the assign methods,
  15. * but this would only be for overriding the default behavior of the
  16. * OsidLoader.getManager method.
  17. * </p>
  18. *
  19. * <p>
  20. * The OsidLoader.getManager method checks its OsidContext argument to make
  21. * sure it is not null, and then calls the Osidmanager implementation class
  22. * assignOsidContext method.
  23. * </p>
  24. *
  25. * <p>
  26. * The OsidLoader.getManager method loads a properties file that contains the
  27. * configuration information if one exists. The configuration information is
  28. * set by the system integrator who has installed an implementation. The
  29. * configuration properties file is loaded by by the OsidLoader.getManager
  30. * method using the getResourceAsStream method of the OSID's OsidManager class
  31. * to search for the configuration properties file. The properties from the
  32. * loaded configuration file are overlaid with any configuration properties
  33. * supplied by the application in the call to the OsidLoader.getManager call
  34. * in the additionalConfiguration argument. The assignConfiguration method is
  35. * then called.
  36. * </p>
  37. *
  38. * <p>
  39. * Typically, the application calls the getOsidContext method only. It is
  40. * unusual for the application to override the OsidLoader.getManager and call
  41. * assignOsidContext or assignConfiguration.
  42. * </p>
  43. *
  44. * <p>
  45. * The implementation of OsidManager can use both the OsidContext and the
  46. * Configuration properties as needed.
  47. * </p>
  48. *
  49. * <p>
  50. * OSID Version: 2.0
  51. * </p>
  52. *
  53. * <p>
  54. * Licensed under the {@link org.osid.SidImplementationLicenseMIT MIT}
  55. * O.K.I&#46; OSID Definition License}.
  56. * </p>
  57. *
  58. * @package org.osid
  59. */
  60. class OsidManager
  61. {
  62. /**
  63. * Return context of this OsidManager.
  64. *
  65. * @return object OsidContext
  66. *
  67. * @throws object OsidException
  68. *
  69. * @access public
  70. */
  71. function getOsidContext () {
  72. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  73. }
  74.  
  75. /**
  76. * Assign the context of this OsidManager.
  77. *
  78. * @param object OsidContext $context
  79. *
  80. * @throws object OsidException An exception with one of the following
  81. * messages defined in org.osid.OsidException: {@link }
  82. * org.osid.OsidException#NULL_ARGUMENT NULL_ARGUMENT}
  83. *
  84. * @access public
  85. */
  86. function assignOsidContext ( $context ) {
  87. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  88. }
  89.  
  90. /**
  91. * Assign the configuration of this OsidManager.
  92. *
  93. * @param object Properties $configuration (original type: java.util.Properties)
  94. *
  95. * @throws object OsidException An exception with one of the following
  96. * messages defined in org.osid.OsidException: {@link }
  97. * org.osid.OsidException#OPERATION_FAILED OPERATION_FAILED},
  98. * {@link org.osid.OsidException#PERMISSION_DENIED}
  99. * PERMISSION_DENIED}, {@link }
  100. * org.osid.OsidException#CONFIGURATION_ERROR
  101. * CONFIGURATION_ERROR}, {@link }
  102. * org.osid.OsidException#UNIMPLEMENTED UNIMPLEMENTED}, {@link }
  103. * org.osid.OsidException#NULL_ARGUMENT NULL_ARGUMENT}
  104. *
  105. * @access public
  106. */
  107. function assignConfiguration ( $configuration ) {
  108. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  109. }
  110.  
  111. /**
  112. * Verify to OsidLoader that it is loading
  113. *
  114. * <p>
  115. * OSID Version: 2.0
  116. * </p>
  117. * .
  118. *
  119. * @throws object OsidException
  120. *
  121. * @access public
  122. */
  123. function osidVersion_2_0 () {
  124. die ("Method <b>".__FUNCTION__."()</b> declared in interface<b> ".__CLASS__."</b> has not been overloaded in a child class.");
  125. }
  126. }
  127.  
  128. ?>

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