* Tous droits réservés. */ namespace Irstea\PlantUmlBundle\Model\Filter; use ReflectionClass; /** * Description of DirectoryFilter * * @author Guillaume Perréal */ class DirectoryFilter extends AbstractListFilter { const CONF_TYPE = 'directories'; protected function extract(ReflectionClass $class) { return dirname($class->getFileName()); } protected function matches($tested, $reference) { return strpos($tested, $reference) === 0; } protected function normalize($path) { return rtrim(strtr($path, '/\\', DIRECTORY_SEPARATOR), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR; } }