@@ 14-31 (lines=18) @@ | ||
11 | ||
12 | namespace Serafim\Stream\Filter; |
|
13 | ||
14 | class Conjunction extends BaseFilter |
|
15 | { |
|
16 | /** |
|
17 | * @param string $class |
|
18 | * @param string $pathname |
|
19 | * @return bool |
|
20 | */ |
|
21 | public function match(string $class, string $pathname): bool |
|
22 | { |
|
23 | foreach ($this->filters as $filter) { |
|
24 | if (! $filter($class, $pathname)) { |
|
25 | return false; |
|
26 | } |
|
27 | } |
|
28 | ||
29 | return true; |
|
30 | } |
|
31 | } |
|
32 |
@@ 14-31 (lines=18) @@ | ||
11 | ||
12 | namespace Serafim\Stream\Filter; |
|
13 | ||
14 | class Disjunction extends BaseFilter |
|
15 | { |
|
16 | /** |
|
17 | * @param string $class |
|
18 | * @param string $pathname |
|
19 | * @return bool |
|
20 | */ |
|
21 | public function match(string $class, string $pathname): bool |
|
22 | { |
|
23 | foreach ($this->filters as $filter) { |
|
24 | if ($filter($class, $pathname)) { |
|
25 | return true; |
|
26 | } |
|
27 | } |
|
28 | ||
29 | return false; |
|
30 | } |
|
31 | } |
|
32 |