‪TYPO3CMS  ‪main
TYPO3\CMS\Core\TypoScript\TypoScriptStringFactory Class Reference

Public Member Functions

 __construct (private readonly ContainerInterface $container, private readonly TokenizerInterface $tokenizer,)
 
 parseFromStringWithIncludes (string $name, string $typoScript)
 
 parseFromString (string $typoScript, AstBuilderInterface $astBuilder)
 

Detailed Description

A factory to create the AST object tree for a given TypoScript snippet.

This is used by some consumers in the core that parse a TypoScript a-like syntax that is not Frontend TypoScript and TsConfig directly.

Definition at line 36 of file TypoScriptStringFactory.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\TypoScript\TypoScriptStringFactory::__construct ( private readonly ContainerInterface  $container,
private readonly TokenizerInterface  $tokenizer 
)

Definition at line 38 of file TypoScriptStringFactory.php.

Member Function Documentation

◆ parseFromString()

TYPO3\CMS\Core\TypoScript\TypoScriptStringFactory::parseFromString ( string  $typoScript,
AstBuilderInterface  $astBuilder 
)

Parse a single string not supporting imports, conditions and caching. Detail method used in install tool and in a couple of other special cases.

Definition at line 67 of file TypoScriptStringFactory.php.

References TYPO3\CMS\Core\TypoScript\AST\AstBuilderInterface\build().

◆ parseFromStringWithIncludes()

TYPO3\CMS\Core\TypoScript\TypoScriptStringFactory::parseFromStringWithIncludes ( string  $name,
string  $typoScript 
)

Parse a single string and support imports and conditions, cache optionally.

Parameters
non-empty-string$name‪A name used as cache identifier, [a-z,A-Z,-] only

Definition at line 48 of file TypoScriptStringFactory.php.

References $name.