Source for file OrSearch.class.php

Documentation is available at OrSearch.class.php

  1. <?php
  2.  
  3. require_once HARMONI."dataManager/search/MultipleCriteriaSearch.abstract.php";
  4. /**
  5. * The OrSearch criteria takes a list of other search criteria and OR's them together in the SQL query.
  6. *
  7. * @package harmoni.datamanager.search
  8. *
  9. * @copyright Copyright &copy; 2005, Middlebury College
  10. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  11. *
  12. * @version $Id: OrSearch.class.php,v 1.5 2007/04/12 15:37:25 adamfranco Exp $
  13. */
  14. class OrSearch extends MultipleCriteriaSearch {
  15. function returnSearchString() {
  16. $parts = array();
  17. foreach (array_keys($this->_criteria) as $key) {
  18. if ($string = $this->_criteria[$key]->returnSearchString()) $parts[] = $string;
  19. }
  20. if (!count($parts)) return null;
  21. return "(" . implode(" OR ",$parts) . ")";
  22. }
  23.  
  24. function postProcess($ids) { return $ids; }
  25. }

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