AnnotationsCacheWarmer
extends AbstractPhpFileCacheWarmer
in package
Warms up annotation caches for classes found in composer's autoload class map and declared in DI bundle extensions using the addAnnotatedClassesToCache method.
Tags
Table of Contents
Properties
- $annotationReader : mixed
- $debug : bool
- $excludeRegexp : string|null
- $phpArrayFile : string
Methods
- __construct() : mixed
- isOptional() : bool
- Checks whether this warmer is optional or not.
- warmUp() : array<string|int, string>
- {@inheritdoc}
- doWarmUp() : bool
- warmUpPhpArrayAdapter() : array<string|int, string>
- readAllComponents() : mixed
Properties
$annotationReader
private
mixed
$annotationReader
$debug
private
bool
$debug
$excludeRegexp
private
string|null
$excludeRegexp
$phpArrayFile
private
string
$phpArrayFile
Methods
__construct()
public
__construct(Reader $annotationReader, string $phpArrayFile[, string $excludeRegexp = null ][, bool $debug = false ]) : mixed
Parameters
- $annotationReader : Reader
- $phpArrayFile : string
-
The PHP file where annotations are cached
- $excludeRegexp : string = null
- $debug : bool = false
isOptional()
Checks whether this warmer is optional or not.
public
isOptional() : bool
Return values
boolwarmUp()
{@inheritdoc}
public
warmUp(string $cacheDir) : array<string|int, string>
Parameters
- $cacheDir : string
Return values
array<string|int, string> —A list of classes to preload on PHP 7.4+
doWarmUp()
protected
doWarmUp(string $cacheDir, ArrayAdapter $arrayAdapter) : bool
Parameters
- $cacheDir : string
- $arrayAdapter : ArrayAdapter
Return values
bool —false if there is nothing to warm-up
warmUpPhpArrayAdapter()
protected
warmUpPhpArrayAdapter(PhpArrayAdapter $phpArrayAdapter, array<string|int, mixed> $values) : array<string|int, string>
Parameters
- $phpArrayAdapter : PhpArrayAdapter
- $values : array<string|int, mixed>
Return values
array<string|int, string> —A list of classes to preload on PHP 7.4+
readAllComponents()
private
readAllComponents(Reader $reader, string $class) : mixed
Parameters
- $reader : Reader
- $class : string