SoftReferenceParserFactory

Attributes
#[Autoconfigure]
$public: true

Table of Contents

Properties

$logger  : LoggerInterface
$runtimeCache  : FrontendInterface
$softReferenceParsers  : array<string|int, mixed>

Methods

__construct()  : mixed
addParser()  : void
Adds a parser via DI.
getParsersBySoftRefParserList()  : iterable<string|int, SoftReferenceParserInterface>
getSoftReferenceParser()  : SoftReferenceParserInterface
Get a Soft Reference Parser by the given soft reference key.
getSoftReferenceParsers()  : array<string|int, mixed>
Get all registered soft reference parsers
hasSoftReferenceParser()  : bool
explodeSoftRefParserList()  : array<string|int, mixed>|null
Returns array of soft parser references

Properties

$logger read-only

protected LoggerInterface $logger

$softReferenceParsers

protected array<string|int, mixed> $softReferenceParsers = []

Methods

getParsersBySoftRefParserList()

public getParsersBySoftRefParserList(string $softRefParserList[, array<string|int, mixed>|null $forcedParameters = null ]) : iterable<string|int, SoftReferenceParserInterface>
Parameters
$softRefParserList : string
$forcedParameters : array<string|int, mixed>|null = null
Return values
iterable<string|int, SoftReferenceParserInterface>

getSoftReferenceParser()

Get a Soft Reference Parser by the given soft reference key.

public getSoftReferenceParser(string $softReferenceParserKey) : SoftReferenceParserInterface

Implementation must be registered in Configuration/Services.yaml

VENDOR\YourExtension\SoftReference\UserDefinedSoftReferenceParser: tags: - name: softreference.parser parserKey: userdefined

Parameters
$softReferenceParserKey : string
Return values
SoftReferenceParserInterface

getSoftReferenceParsers()

Get all registered soft reference parsers

public getSoftReferenceParsers() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasSoftReferenceParser()

public hasSoftReferenceParser(string $softReferenceParserKey) : bool
Parameters
$softReferenceParserKey : string
Return values
bool

explodeSoftRefParserList()

Returns array of soft parser references

protected explodeSoftRefParserList(string $parserList) : array<string|int, mixed>|null
Parameters
$parserList : string

softRef parser list

Return values
array<string|int, mixed>|null

Array where the parser key is the key and the value is the parameter string, FALSE if no parsers were found


        
On this page

Search results