UniqueSlugNormalizerInterface
extends
TextNormalizerInterface
in
Creates a normalized version of the given input text
Table of Contents
Constants
- DISABLED = false
- PER_DOCUMENT = 'document'
- PER_ENVIRONMENT = 'environment'
Methods
- clearHistory() : void
- Called by the Environment whenever the configured scope changes
- normalize() : string
Constants
DISABLED
public
mixed
DISABLED
= false
PER_DOCUMENT
public
mixed
PER_DOCUMENT
= 'document'
PER_ENVIRONMENT
public
mixed
PER_ENVIRONMENT
= 'environment'
Methods
clearHistory()
Called by the Environment whenever the configured scope changes
public
clearHistory() : void
Currently, this will only be called PER_DOCUMENT.
normalize()
public
normalize(string $text[, array<string, mixed> $context = [] ]) : string
Parameters
- $text : string
-
The text to normalize
- $context : array<string, mixed> = []
-
Additional context about the text being normalized (optional)
$context may include (but is not required to include) the following:
prefix- A string prefix to prepend to each normalized resultlength- The requested maximum lengthnode- The node we're normalizing text for
Implementations do not have to use or respect any information within that $context