PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/administrator/components/com_joomlaxplorer/libraries/Archive/Predicate/And.php

http://joostina121.googlecode.com/
PHP | 23 lines | 20 code | 3 blank | 0 comment | 1 complexity | 37aab94f3258be7d549159daf0b8a3cc MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0
  1. defined('_VALID_MOS') or die();
  2. require_once dirname(__file__)."/../Predicate.php";
  3. class File_Archive_Predicate_And extends File_Archive_Predicate {
  4. var $preds;
  5. function File_Archive_Predicate_And() {
  6. $this->preds = func_get_args();
  7. }
  8. function addPredicate($pred) {
  9. $this->preds[] = $pred;
  10. }
  11. function isTrue(&$source) {
  12. foreach($this->preds as $p) {
  13. if(!$p->isTrue($source)) {
  14. return false;
  15. }
  16. }
  17. return true;
  18. }
  19. }
  20. ?>