Tailor\Classes\BlueprintVerifier
Overview
BlueprintVerifier super class responsible for validating blueprints
Protected Properties
protected array $registeredBlueprints
registeredBlueprints tracks blueprints that have been validated
protected array $warnings
warnings collects non-fatal validation warnings
protected array|null $knownSources
knownSources stores known blueprint handles and UUIDs for source validation
protected array $reservedFieldNames
reservedFieldNames are field names that cannot be used as field names.
See Also
Public Methods
public clearCache()
public clearCache(): void
clearCache resets all validation caches
public getWarnings()
public getWarnings(): array
getWarnings returns collected validation warnings
public static instance()
public static instance(): static
instance creates a new instance of this singleton
public verifyBlueprint()
public verifyBlueprint($blueprint): void
Protected Methods
protected findLineFromKeyValPair()
protected findLineFromKeyValPair($content, $key, $val): void
protected loadKnownSources()
protected loadKnownSources(): void
loadKnownSources lazy-loads all blueprint handles and UUIDs for source validation
protected sourceExists()
protected sourceExists($source): bool
sourceExists checks if a source exists as any blueprint (by handle or UUID)
protected validateFieldset()
protected validateFieldset($blueprint): void
protected validateSourceReferences()
protected validateSourceReferences($blueprint, $fields): void
validateSourceReferences validates source references in raw field config recursively, including repeater groups
protected validateSupportedTypes()
protected validateSupportedTypes($blueprint): void
validateSupportedTypes checks for valid blueprint types
protected validateUniqueBlueprint()
protected validateUniqueBlueprint($blueprint): void
validateUniqueBlueprint checks for duplicate handles and UUIDs across blueprints
protected validateUniqueProperty()
protected validateUniqueProperty(
$blueprint,
$property,
$key,
$filePath,
$theme = null
): void
validateUniqueProperty checks a property value is unique across blueprints. Duplicates are collected as warnings instead of throwing exceptions since the first registered blueprint (by priority order) takes precedence.
protected validateYamlSyntax()
protected validateYamlSyntax($blueprint): void
validateYamlSyntax checks the YAML syntax and parses attributes
protected yamlToBlueprintException()
protected yamlToBlueprintException($blueprint, $ex): void
yamlToBlueprintException is a workaround to access protected property rawMessage