AnyFilter.php 472 Bytes
Newer Older
1
<?php declare(strict_types=1);
2
/*
Guillaume Perréal's avatar
CS.  
Guillaume Perréal committed
3
 * Copyright (C) 2016-2018 IRSTEA
Guillaume Perréal's avatar
CS.  
Guillaume Perréal committed
4
 * All rights reserved.
5 6 7 8 9
 */

namespace Irstea\PlantUmlBundle\Model\Filter\Composite;

/**
Guillaume Perréal's avatar
CS.  
Guillaume Perréal committed
10
 * Description of AnyFilter.
11 12 13 14 15
 */
class AnyFilter extends AbstractCompositeFilter
{
    public function accept(\ReflectionClass $class)
    {
Guillaume Perréal's avatar
CS.  
Guillaume Perréal committed
16
        foreach ($this->filters as $filter) {
17 18 19 20
            if ($filter->accept($class)) {
                return true;
            }
        }
Guillaume Perréal's avatar
CS.  
Guillaume Perréal committed
21

22 23 24
        return false;
    }
}