SetRegistry
class \
Attributes
- #[Autoconfigure]
- $public: true
Table of Contents
Properties
- $cache : PhpFrontend
- $cacheIdentifier : string
- $dependencyOrderingService : DependencyOrderingService
- $invalidSets : array<string, array{error: SetError, name: string, context: string}>
- $logger : LoggerInterface
- $orderedSets : array<int, SetDefinition>|null
- $setCollector : SetCollector
Methods
- __construct() : mixed
- getAllSets() : array<string, SetDefinition>
- getInvalidSets() : array<string, array{error: SetError, name: string, context: string}>
- getSet() : SetDefinition|null
- getSets() : array<int, SetDefinition>
- Retrieve list of ordered sets, matched by $setNames, including their dependencies (recursive)
- hasSet() : bool
- warmupCaches() : void
- addSetWithDependencies() : void
- checkCircularDependencies() : string|null
- Optional dependencies are followed as well, since they take part in the ordering.
- checkMissingDependencies() : string|null
- computeOrderedSets() : array<string, SetDefinition>
- getFromCache() : array<string, SetDefinition>
- getOrderedSets() : array<string, SetDefinition>
Properties
$cache read-only
protected
PhpFrontend
$cache
Attributes
- #[Autowire]
- $service: 'cache.core'
$cacheIdentifier read-only
protected
string
$cacheIdentifier
Attributes
- #[Autowire]
- $expression: 'service("package-dependent-cache-identifier").withPrefix("Sets").toString()'
$dependencyOrderingService
protected
DependencyOrderingService
$dependencyOrderingService
$invalidSets
protected
array<string, array{error: SetError, name: string, context: string}>
$invalidSets
= null
$logger
protected
LoggerInterface
$logger
$orderedSets
protected
array<int, SetDefinition>|null
$orderedSets
= null
$setCollector
protected
SetCollector
$setCollector
Attributes
- #[Autowire]
- $lazy: true
Methods
__construct()
public
__construct(DependencyOrderingService $dependencyOrderingService, string $cacheIdentifier, PhpFrontend $cache, SetCollector $setCollector, LoggerInterface $logger) : mixed
Parameters
- $dependencyOrderingService : DependencyOrderingService
- $cacheIdentifier : string
- $cache : PhpFrontend
- $setCollector : SetCollector
- $logger : LoggerInterface
getAllSets()
public
getAllSets() : array<string, SetDefinition>
Internal
Return values
array<string, SetDefinition>getInvalidSets()
public
getInvalidSets() : array<string, array{error: SetError, name: string, context: string}>
Return values
array<string, array{error: SetError, name: string, context: string}>getSet()
public
getSet(string $setName) : SetDefinition|null
Parameters
- $setName : string
Return values
SetDefinition|nullgetSets()
Retrieve list of ordered sets, matched by $setNames, including their dependencies (recursive)
public
getSets(string ...$setNames) : array<int, SetDefinition>
The sets are ordered the way they are requested, each of them preceded by the sets it depends on. A set reached more than once keeps its first position, so a set always comes after its dependencies, and two sets without a dependency relation between them keep the order of $setNames.
Parameters
- $setNames : string
Return values
array<int, SetDefinition>hasSet()
public
hasSet(string $setName) : bool
Parameters
- $setName : string
Return values
boolwarmupCaches()
public
warmupCaches(CacheWarmupEvent $event) : void
Parameters
- $event : CacheWarmupEvent
Attributes
- #[AsEventListener]
- 'typo3-core/set-registry'
addSetWithDependencies()
protected
addSetWithDependencies(array<string, SetDefinition> $availableSets, string $setName, array<string, SetDefinition> &$sets, array<string, true> &$visiting) : void
Parameters
- $availableSets : array<string, SetDefinition>
- $setName : string
- $sets : array<string, SetDefinition>
- $visiting : array<string, true>
checkCircularDependencies()
Optional dependencies are followed as well, since they take part in the ordering.
protected
checkCircularDependencies(array $sets, SetDefinition $set[, array<string, true> $path = [] ][, array<string, true> &$checked = [] ]) : string|null
Parameters
- $sets : array
- $set : SetDefinition
- $path : array<string, true> = []
-
The sets on the way to $set
- $checked : array<string, true> = []
-
Sets whose dependencies have been checked without finding a cycle
Return values
string|nullcheckMissingDependencies()
protected
checkMissingDependencies(array $sets, SetDefinition $set[, array<string, true> $path = [] ]) : string|null
Parameters
- $sets : array
- $set : SetDefinition
- $path : array<string, true> = []
-
The sets on the way to $set, a dependency on one of them is a cycle and reported by checkCircularDependencies()
Return values
string|nullcomputeOrderedSets()
protected
computeOrderedSets() : array<string, SetDefinition>
Return values
array<string, SetDefinition>getFromCache()
protected
getFromCache() : array<string, SetDefinition>
Return values
array<string, SetDefinition>getOrderedSets()
protected
getOrderedSets() : array<string, SetDefinition>