/administrator/components/com_joomlaxplorer/libraries/Archive/Predicate/And.php
PHP | 23 lines | 20 code | 3 blank | 0 comment | 1 complexity | 37aab94f3258be7d549159daf0b8a3cc MD5 | raw file
Possible License(s): LGPL-2.1, GPL-2.0
-
-
- defined('_VALID_MOS') or die();
- require_once dirname(__file__)."/../Predicate.php";
- class File_Archive_Predicate_And extends File_Archive_Predicate {
- var $preds;
- function File_Archive_Predicate_And() {
- $this->preds = func_get_args();
- }
- function addPredicate($pred) {
- $this->preds[] = $pred;
- }
- function isTrue(&$source) {
- foreach($this->preds as $p) {
- if(!$p->isTrue($source)) {
- return false;
- }
- }
- return true;
- }
- }
-
- ?>