function AddAnnotatedClassesToCachePass::matchAnyRegexps
1 call to AddAnnotatedClassesToCachePass::matchAnyRegexps()
- AddAnnotatedClassesToCachePass::expandClasses in vendor/
symfony/ http-kernel/ DependencyInjection/ AddAnnotatedClassesToCachePass.php - Expands the given class patterns using a list of existing classes.
File
-
vendor/
symfony/ http-kernel/ DependencyInjection/ AddAnnotatedClassesToCachePass.php, line 128
Class
- AddAnnotatedClassesToCachePass
- Sets the classes to compile in the cache for the container.
Namespace
Symfony\Component\HttpKernel\DependencyInjectionCode
private function matchAnyRegexps(string $class, array $regexps) : bool {
$isTest = str_contains($class, 'Test');
foreach ($regexps as $regex) {
if ($isTest && !str_contains($regex, 'Test')) {
continue;
}
if (preg_match($regex, '\\' . $class)) {
return true;
}
}
return false;
}