‪TYPO3CMS  ‪main
TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory Class Reference

Public Member Functions

 __construct (FrontendInterface $runtimeCache, LoggerInterface $logger)
 
 addParser (SoftReferenceParserInterface $softReferenceParser, string $parserKey)
 
iterable< SoftReferenceParserInterfacegetParsersBySoftRefParserList (string $softRefParserList, array $forcedParameters=null)
 
 hasSoftReferenceParser (string $softReferenceParserKey)
 
 getSoftReferenceParser (string $softReferenceParserKey)
 
 getSoftReferenceParsers ()
 

Protected Member Functions

array null explodeSoftRefParserList (string $parserList)
 

Protected Attributes

array $softReferenceParsers = []
 
FrontendInterface $runtimeCache
 
LoggerInterface $logger
 

Detailed Description

Factory class for soft reference parsers

Definition at line 27 of file SoftReferenceParserFactory.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::__construct ( FrontendInterface  $runtimeCache,
LoggerInterface  $logger 
)

Member Function Documentation

◆ addParser()

TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::addParser ( SoftReferenceParserInterface  $softReferenceParser,
string  $parserKey 
)

Adds a parser via DI.

Definition at line 44 of file SoftReferenceParserFactory.php.

◆ explodeSoftRefParserList()

array null TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::explodeSoftRefParserList ( string  $parserList)
protected

Returns array of soft parser references

Parameters
string$parserList‪softRef parser list
Returns
‪array|null Array where the parser key is the key and the value is the parameter string, FALSE if no parsers were found

Definition at line 57 of file SoftReferenceParserFactory.php.

References $output, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory\getParsersBySoftRefParserList().

◆ getParsersBySoftRefParserList()

iterable<SoftReferenceParserInterface> TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::getParsersBySoftRefParserList ( string  $softRefParserList,
array  $forcedParameters = null 
)

◆ getSoftReferenceParser()

TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::getSoftReferenceParser ( string  $softReferenceParserKey)

Get a Soft Reference Parser by the given soft reference key. Implementation must be registered in Configuration/Services.yaml

VENDOR\YourExtension\SoftReference\UserDefinedSoftReferenceParser: tags:

  • ‪name: softreference.parser parserKey: userdefined
Parameters
string$softReferenceParserKey

Definition at line 123 of file SoftReferenceParserFactory.php.

References TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory\hasSoftReferenceParser().

Referenced by TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory\getParsersBySoftRefParserList().

◆ getSoftReferenceParsers()

TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::getSoftReferenceParsers ( )

Get all registered soft reference parsers

Definition at line 145 of file SoftReferenceParserFactory.php.

References TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory\$softReferenceParsers.

◆ hasSoftReferenceParser()

TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::hasSoftReferenceParser ( string  $softReferenceParserKey)

Member Data Documentation

◆ $logger

LoggerInterface TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::$logger
protected

◆ $runtimeCache

FrontendInterface TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::$runtimeCache
protected

◆ $softReferenceParsers

array TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserFactory::$softReferenceParsers = []
protected