Source for file OrderedSet.interface.php

Documentation is available at OrderedSet.interface.php

  1. <?php
  2.  
  3. require_once(dirname(__FILE__)."/Set.interface.php");
  4.  
  5. /**
  6. * The OrderedSet interface defines methods that are needed for ordering
  7. * sets of ids. Sets provide for the easy storage of groups of ids.
  8. *
  9. * @package harmoni.sets
  10. *
  11. * @copyright Copyright &copy; 2005, Middlebury College
  12. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  13. *
  14. * @version $Id: OrderedSet.interface.php,v 1.4 2007/09/04 20:25:49 adamfranco Exp $
  15. * @author Adam Franco
  16. */
  17. class OrderedSetInterface
  18. extends SetInterface {
  19.  
  20. /**
  21. * Add a new Id to the set. The new item will be placed at the end of the set.
  22. * @param object Id $id The Id of the item to add.
  23. * @access public
  24. * @return void
  25. */
  26. function addItem ( $id ) {
  27. die ("Method <b>".__FUNCTION__."()</b> declared in interface <b> ".__CLASS__."</b> has not been overloaded in a child class.");
  28. }
  29. /**
  30. * Move the specified id toward the begining of the set.
  31. * @param object Id $id The Id of the item to move.
  32. * @access public
  33. * @return void
  34. */
  35. function moveUp ( $id ) {
  36. die ("Method <b>".__FUNCTION__."()</b> declared in interface <b> ".__CLASS__."</b> has not been overloaded in a child class.");
  37. }
  38. /**
  39. * Move the specified id toward the end of the set.
  40. * @param object Id $id The Id of the item to move.
  41. * @access public
  42. * @return void
  43. */
  44. function moveDown ( $id ) {
  45. die ("Method <b>".__FUNCTION__."()</b> declared in interface <b> ".__CLASS__."</b> has not been overloaded in a child class.");
  46. }
  47. /**
  48. * Return the current position of the id in the set.
  49. * @param object Id $id The Id of the item to move.
  50. * @access public
  51. * @return integer
  52. */
  53. function getPosition ( $id ) {
  54. die ("Method <b>".__FUNCTION__."()</b> declared in interface <b> ".__CLASS__."</b> has not been overloaded in a child class.");
  55. }
  56. /**
  57. * Return the number of ids in the set.
  58. * @access public
  59. * @return integer
  60. */
  61. function count () {
  62. die ("Method <b>".__FUNCTION__."()</b> declared in interface <b> ".__CLASS__."</b> has not been overloaded in a child class.");
  63. }
  64. /**
  65. * Move the specified id to the specified position in the set.
  66. * @param object Id $id The Id of the item to move.
  67. * @param integer $position The new position of the specified id.
  68. * @access public
  69. * @return void
  70. */
  71. function moveToPosition ( $id, $position ) {
  72. die ("Method <b>".__FUNCTION__."()</b> declared in interface <b> ".__CLASS__."</b> has not been overloaded in a child class.");
  73. }
  74. }

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