Source for file SearchCriteria.interface.php

Documentation is available at SearchCriteria.interface.php

  1. <?php
  2.  
  3. /**
  4. * @constant int SEARCH_TYPE_EQUALS Specifies a search of value1=value2.
  5. * @package harmoni.datamanager.search
  6. */
  7. define("SEARCH_TYPE_EQUALS", 0);
  8. /**
  9. * @constant int SEARCH_TYPE_GREATER_THAN Specifies a search of value1>value2.
  10. * @package harmoni.datamanager.search
  11. */
  12. define("SEARCH_TYPE_GREATER_THAN", 1);
  13. /**
  14. * @constant int SEARCH_TYPE_LESS_THAN Specifies a search of value1<value2.
  15. * @package harmoni.datamanager.search
  16. */
  17. define("SEARCH_TYPE_LESS_THAN", 2);
  18. /**
  19. * @constant int SEARCH_TYPE_GREATER_THAN_OR_EQUALS Specifies a search of value1>=value2.
  20. * @package harmoni.datamanager.search
  21. */
  22. define("SEARCH_TYPE_GREATER_THAN_OR_EQUALS", 3);
  23. /**
  24. * @constant int SEARCH_TYPE_LESS_THAN_OR_EQUALS Specifies a search of value1<=value2.
  25. * @package harmoni.datamanager.search
  26. */
  27. define("SEARCH_TYPE_LESS_THAN_OR_EQUALS", 4);
  28. /**
  29. * @constant int SEARCH_TYPE_CONTAINS Specifies a search of value2 contains value1 (strings).
  30. * @package harmoni.datamanager.search
  31. */
  32. define("SEARCH_TYPE_CONTAINS", 5);
  33. /**
  34. * @constant int SEARCH_TYPE_IN_LIST Specifies a search of value2 that matches a value in the list (array of values).
  35. * @package harmoni.datamanager.search
  36. */
  37. define("SEARCH_TYPE_IN_LIST", 6);
  38. /**
  39. * @constant int SEARCH_TYPE_NOT_IN_LIST Specifies a search of value2 that does not match any value in the list (array of strings).
  40. * @package harmoni.datamanager.search
  41. */
  42. define("SEARCH_TYPE_NOT_IN_LIST", 7);
  43.  
  44.  
  45. /**
  46. * Search criteria are used when fetching a large number of {@link Record}s but you want to limit those
  47. * down to ones that only match certain criteria. Criteria could hypothetically be anything imaginable,
  48. * as long as they can be represented within an SQL query.
  49. *
  50. * @package harmoni.datamanager.search
  51. *
  52. * @copyright Copyright &copy; 2005, Middlebury College
  53. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  54. *
  55. * @version $Id: SearchCriteria.interface.php,v 1.5 2007/04/12 15:37:25 adamfranco Exp $
  56. */
  57. class SearchCriteria {
  58. /**
  59. * Returns a string with what will end up part of an SQL query in the WHERE clause.
  60. * @return string
  61. * @access public
  62. */
  63. function returnSearchString() { }
  64. /**
  65. * Returns an array of new IDs, giving the criteria the opportunity to do post-processing if that is desired. If no post-processing is to be done, it should return what is passed.
  66. * @param array $ids A list of IDs found by searching with the criteria.
  67. * @return array
  68. * @access public
  69. */
  70. function postProcess($ids) {}
  71. }
  72.  
  73. ?>

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