‪TYPO3CMS  9.5
TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser Class Reference
Inheritance diagram for TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser:
TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait TYPO3\CMS\Backend\Configuration\TsConfigParser

Public Member Functions

 parse ($string, $matchObj='')
 
array getVal ($string, $setup)
 
string doSyntaxHighlight ($string, $lineNum='', $highlightBlockMode=false)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicPropertyDeprecationTrait
bool __isset (string $propertyName)
 
mixed __get (string $propertyName)
 
 __set (string $propertyName, $propertyValue)
 
 __unset (string $propertyName)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait
mixed __call (string $methodName, array $arguments)
 

Static Public Member Functions

static string array checkIncludeLines ($string, $cycle_counter=1, $returnFiles=false, $parentFilenameOrPath='')
 
static includeFile ($filename, $cycle_counter=1, $returnFiles=false, &$newString='', array &$includedFiles=[], $optionalProperties='', $parentFilenameOrPath='')
 
static array checkIncludeLines_array (array $array)
 
static string extractIncludes ($string, $cycle_counter=1, array $extractedFileNames=[], $parentFilenameOrPath='')
 
static array extractIncludes_array (array $array)
 

Public Attributes

array $setup = array( )
 
array $sections = array( )
 
array $sectionsMatch = array( )
 
bool $regComments = false
 
bool $regLinenumbers = false
 
array $errors = array( )
 
int $lineNumberOffset = 0
 
int $breakPointLN = 0
 
TYPO3 CMS Core TypoScript ExtendedTemplateService $parentObject
 

Protected Member Functions

string nextDivider ()
 
string null parseSub (array &$setup)
 
string null executeValueModifier ($modifierName, $modifierArgument=null, $currentValue=null)
 
string rollParseSub ($string, array &$setup)
 
 setVal ($string, array &$setup, $value, $wipeOut=false)
 
array parseNextKeySegment ($key)
 
 error ($err, $num=2)
 
 regHighLight ($code, $pointer, $strlen=-1)
 
string syntaxHighlight_print ($lineNumDat, $highlightBlockMode)
 
TimeTracker getTimeTracker ()
 
string modifyHTMLColor ($color, $R, $G, $B)
 
string modifyHTMLColorAll ($color, $all)
 

Static Protected Member Functions

static string addImportsFromExternalFiles ($typoScript, $cycleCounter, $returnFiles, &$includedFiles, &$parentFilenameOrPath)
 
static string importExternalTypoScriptFile ($filename, $cycleCounter, $returnFiles, array &$includedFiles)
 
static includeDirectory ($dirPath, $cycle_counter=1, $returnFiles=false, &$newString='', array &$includedFiles=[], $optionalProperties='', $parentFilenameOrPath='')
 
static string typoscriptIncludeError ($error)
 
static LoggerInterface getLogger ()
 

Protected Attributes

 $deprecatedPublicProperties
 
 $deprecatedPublicMethods
 
array $raw
 
int $rawP
 
string $lastComment = ''
 
bool $commentSet = false
 
bool $multiLineEnabled = false
 
string $multiLineObject = ''
 
array $multiLineValue = array( )
 
int $inBrace = 0
 
bool $lastConditionTrue = true
 
bool $syntaxHighLight = false
 
array $highLightData = array( )
 
array $highLightData_bracelevel = array( )
 
array $highLightStyles
 
string $highLightBlockStyles = ''
 
string $highLightBlockStyles_basecolor = '#cccccc'
 

Detailed Description

The TypoScript parser

Definition at line 36 of file TypoScriptParser.php.

Member Function Documentation

◆ addImportsFromExternalFiles()

static string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::addImportsFromExternalFiles (   $typoScript,
  $cycleCounter,
  $returnFiles,
$includedFiles,
$parentFilenameOrPath 
)
staticprotected

Splits the unparsed TypoScript content into import statements

Parameters
string$typoScript‪unparsed TypoScript
int$cycleCounter‪counter to stop recursion
bool$returnFiles‪whether to populate the included Files or not
array$includedFiles‪- by reference - if any included files are added, they are added here
string$parentFilenameOrPath‪the current imported file to resolve relative paths - handled by reference
Returns
‪string the unparsed TypoScript with included external files

Definition at line 954 of file TypoScriptParser.php.

References TYPO3\CMS\Core\Utility\PathUtility\getAbsolutePathOfRelativeReferencedFileOrPath(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\importExternalTypoScriptFile().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\checkIncludeLines().

◆ checkIncludeLines()

static string array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::checkIncludeLines (   $string,
  $cycle_counter = 1,
  $returnFiles = false,
  $parentFilenameOrPath = '' 
)
static

Checks the input string (un-parsed TypoScript) for include-commands ("<INCLUDE_TYPOSCRIPT: ....") Use: \TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::checkIncludeLines()

Parameters
string$string‪Unparsed TypoScript
int$cycle_counter‪Counter for detecting endless loops
bool$returnFiles‪When set an array containing the resulting typoscript and all included files will get returned
string$parentFilenameOrPath‪The parent file (with absolute path) or path for relative includes
Returns
‪string|array Complete TypoScript with includes added.

Definition at line 814 of file TypoScriptParser.php.

References $GLOBALS, TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\addImportsFromExternalFiles(), TYPO3\CMS\Core\Utility\PathUtility\getAbsolutePathOfRelativeReferencedFileOrPath(), TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\getLogger(), TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\includeDirectory(), TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\includeFile(), TYPO3\CMS\Core\Utility\StringUtility\removeByteOrderMark(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\typoscriptIncludeError().

Referenced by TYPO3\CMS\Backend\View\BackendLayoutView\getSelectedBackendLayout(), TYPO3\CMS\Core\Tests\Unit\TypoScript\Parser\TypoScriptParserTest\importFiles(), TYPO3\CMS\Core\Tests\Unit\TypoScript\Parser\TypoScriptParserTest\includeFilesWithConditions(), and TYPO3\CMS\Core\TypoScript\TemplateService\processIncludes().

◆ checkIncludeLines_array()

static array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::checkIncludeLines_array ( array  $array)
static

Parses the string in each value of the input array for include-commands

Parameters
array$array‪Array with TypoScript in each value
Returns
‪array Same array but where the values has been parsed for include-commands

Definition at line 1214 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData(), TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController\getPagesTSconfig(), TYPO3\CMS\Backend\Utility\BackendUtility\getRawPagesTSconfig(), TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication\getUserTSconf(), and TYPO3\CMS\Core\TypoScript\TemplateService\mergeConstantsFromPageTSconfig().

◆ doSyntaxHighlight()

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::doSyntaxHighlight (   $string,
  $lineNum = '',
  $highlightBlockMode = false 
)

Syntax highlight a TypoScript text Will parse the content. Remember, the internal setup array may contain invalid parsed content since conditions are ignored!

Parameters
string$string‪The TypoScript text
mixed$lineNum‪If blank, linenumbers are NOT printed. If array then the first key is the linenumber offset to add to the internal counter.
bool$highlightBlockMode‪If set, then the highlighted output will be formatted in blocks based on the brace levels. prespace will be ignored and empty lines represented with a single no-break-space.
Returns
‪string HTML code for the syntax highlighted string

Definition at line 1405 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parse(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\syntaxHighlight_print().

◆ error()

TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::error (   $err,
  $num = 2 
)
protected

Stacks errors/messages from the TypoScript parser into an internal array, $this->error If "TT" is a global object (as it is in the frontend when backend users are logged in) the message will be registered here as well.

Parameters
string$err‪The error message string
int$num‪The error severity (in the scale of TimeTracker::setTSlogMessage: Approx: 2=warning, 1=info, 0=nothing, 3=fatal.)

Definition at line 794 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\$lineNumberOffset, and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\getTimeTracker().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parse(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

◆ executeValueModifier()

string null TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::executeValueModifier (   $modifierName,
  $modifierArgument = null,
  $currentValue = null 
)
protected

Executes operator functions, called from TypoScript example: page.10.value := appendString(!)

Parameters
string$modifierNameTypoScript function called
string$modifierArgument‪Function arguments; In case of multiple arguments, the method must split on its own
string$currentValue‪Current TypoScript value
Returns
‪string|null Modified result or null for no modification

Definition at line 543 of file TypoScriptParser.php.

References $GLOBALS, and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\getLogger().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

◆ extractIncludes()

static string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::extractIncludes (   $string,
  $cycle_counter = 1,
array  $extractedFileNames = [],
  $parentFilenameOrPath = '' 
)
static

Search for commented INCLUDE_TYPOSCRIPT statements and save the content between the BEGIN and the END line to the specified file

Parameters
string$string‪Template content
int$cycle_counter‪Counter for detecting endless loops
array$extractedFileNames
string$parentFilenameOrPath
Exceptions

Definition at line 1236 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\extractIncludes_array().

◆ extractIncludes_array()

static array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::extractIncludes_array ( array  $array)
static

Processes the string in each value of the input array with extractIncludes

Parameters
array$array‪Array with TypoScript in each value
Returns
‪array Same array but where the values has been processed with extractIncludes

Definition at line 1383 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\extractIncludes().

◆ getLogger()

static LoggerInterface TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::getLogger ( )
staticprotected

Get a logger instance

This class uses logging mostly in static functions, hence we need a static getter for the logger. Injection of a logger instance via GeneralUtility::makeInstance is not possible.

Returns
‪LoggerInterface

Definition at line 1541 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\checkIncludeLines(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\executeValueModifier().

◆ getTimeTracker()

TimeTracker TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::getTimeTracker ( )
protected

◆ getVal()

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::getVal (   $string,
  $setup 
)

Get a value/property pair for an object path in TypoScript, eg. "myobject.myvalue.mysubproperty". Here: Used by the "copy" operator, <

Parameters
string$string‪Object path for which to get the value
array$setup‪Global setup code if $string points to a global object path. But if string is prefixed with "." then its the local setup array.
Returns
‪array An array with keys 0/1 being value/property respectively

Definition at line 656 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\$setup, and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseNextKeySegment().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

◆ importExternalTypoScriptFile()

static string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::importExternalTypoScriptFile (   $filename,
  $cycleCounter,
  $returnFiles,
array &  $includedFiles 
)
staticprotected

Include file $filename. Contents of the file will be returned, filename is added to &$includedFiles. Further include/import statements in the contents are processed recursively.

Parameters
string$filename‪Full absolute path+filename to the typoscript file to be included
int$cycleCounter‪Counter for detecting endless loops
bool$returnFiles‪When set, filenames of included files will be prepended to the array &$includedFiles
array&$includedFiles‪Array to which the filenames of included files will be prepended (referenced)
Returns
‪string the unparsed TypoScript content from external files

Definition at line 990 of file TypoScriptParser.php.

References $finder, TYPO3\CMS\Core\Utility\PathUtility\basename(), TYPO3\CMS\Core\Utility\PathUtility\dirname(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\typoscriptIncludeError().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\addImportsFromExternalFiles().

◆ includeDirectory()

static TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::includeDirectory (   $dirPath,
  $cycle_counter = 1,
  $returnFiles = false,
$newString = '',
array &  $includedFiles = [],
  $optionalProperties = '',
  $parentFilenameOrPath = '' 
)
staticprotected

Include all files with matching Typoscript extensions in directory $dirPath. Contents of the files are prepended to &$newstring, filename to &$includedFiles. Order of the directory items to be processed: files first, then directories, both in alphabetical order. Further include_typoscript tags in the contents of the files are processed recursively.

Parameters
string$dirPath‪Relative path to the directory to be included
int$cycle_counter‪Counter for detecting endless loops
bool$returnFiles‪When set, filenames of included files will be prepended to the array &$includedFiles
string&$newString‪The output string to which the content of the file will be prepended (referenced)
array&$includedFiles‪Array to which the filenames of included files will be prepended (referenced)
string$optionalProperties
string$parentFilenameOrPath‪The parent file (with absolute path) or path for relative includes

Definition at line 1160 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\checkIncludeLines().

◆ includeFile()

static TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::includeFile (   $filename,
  $cycle_counter = 1,
  $returnFiles = false,
$newString = '',
array &  $includedFiles = [],
  $optionalProperties = '',
  $parentFilenameOrPath = '' 
)
static

Include file $filename. Contents of the file will be prepended to &$newstring, filename to &$includedFiles Further include_typoscript tags in the contents are processed recursively

Parameters
string$filename‪Relative path to the typoscript file to be included
int$cycle_counter‪Counter for detecting endless loops
bool$returnFiles‪When set, filenames of included files will be prepended to the array &$includedFiles
string&$newString‪The output string to which the content of the file will be prepended (referenced
array&$includedFiles‪Array to which the filenames of included files will be prepended (referenced)
string$optionalProperties
string$parentFilenameOrPath‪The parent file (with absolute path) or path for relative includes

Definition at line 1094 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\checkIncludeLines().

◆ modifyHTMLColor()

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::modifyHTMLColor (   $color,
  $R,
  $G,
  $B 
)
protected

Modifies a HTML Hex color by adding/subtracting $R,$G and $B integers

Parameters
string$color‪A hexadecimal color code, #xxxxxx
int$R‪Offset value 0-255
int$G‪Offset value 0-255
int$B‪Offset value 0-255
Returns
‪string A hexadecimal color code, #xxxxxx, modified according to input vars
See also
modifyHTMLColorAll()

Definition at line 1511 of file TypoScriptParser.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\modifyHTMLColorAll().

◆ modifyHTMLColorAll()

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::modifyHTMLColorAll (   $color,
  $all 
)
protected

Modifies a HTML Hex color by adding/subtracting $all integer from all R/G/B channels

Parameters
string$color‪A hexadecimal color code, #xxxxxx
int$all‪Offset value 0-255 for all three channels.
Returns
‪string A hexadecimal color code, #xxxxxx, modified according to input vars
See also
modifyHTMLColor()

Definition at line 1528 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\modifyHTMLColor().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\syntaxHighlight_print().

◆ nextDivider()

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::nextDivider ( )
protected

Will search for the next condition. When found it will return the line content (the condition value) and have advanced the internal $this->rawP pointer to point to the next line after the condition.

Returns
‪string The condition value
See also
parse()

Definition at line 297 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parse().

◆ parse()

TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::parse (   $string,
  $matchObj = '' 
)

Start parsing the input TypoScript text piece. The result is stored in $this->setup

Parameters
string$string‪The TypoScript text
object | string$matchObj‪If is object, then this is used to match conditions found in the TypoScript code. If matchObj not specified, then no conditions will work! (Except [GLOBAL])

Definition at line 242 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\error(), TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\nextDivider(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\doSyntaxHighlight(), and TYPO3\CMS\Backend\Configuration\TsConfigParser\parseWithConditions().

◆ parseNextKeySegment()

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::parseNextKeySegment (   $key)
protected

Determines the first key segment of a TypoScript key by searching for the first unescaped dot in the given key string.

Since the escape characters are only needed to correctly determine the key segment any escape characters before the first unescaped dot are stripped from the key.

Parameters
string$key‪The key, possibly consisting of multiple key segments separated by unescaped dots
Returns
‪array Array with key segment and remaining part of $key

Definition at line 746 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\getVal(), TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\rollParseSub(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\setVal().

◆ parseSub()

◆ regHighLight()

TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::regHighLight (   $code,
  $pointer,
  $strlen = -1 
)
protected

Registers a part of a TypoScript line for syntax highlighting.

Parameters
string$code‪Key from the internal array $this->highLightStyles
int$pointer‪Pointer to the line in $this->raw which this is about
int$strlen‪The number of chars LEFT on this line before the end is reached.
See also
parse()

Definition at line 1424 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\$inBrace.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

◆ rollParseSub()

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::rollParseSub (   $string,
array &  $setup 
)
protected

Parsing of TypoScript keys inside a curly brace where the key is composite of at least two keys, thus having to recursively call itself to get the value

Parameters
string$string‪The object sub-path, eg "thisprop.another_prot
array$setup‪The local setup array from the function calling this function
Returns
‪string Returns the exitSignal
See also
parseSub()

Definition at line 631 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\$setup, TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseNextKeySegment(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

◆ setVal()

TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::setVal (   $string,
array &  $setup,
  $value,
  $wipeOut = false 
)
protected

Setting a value/property of an object string in the setup array.

Parameters
string$string‪The object sub-path, eg "thisprop.another_prot
array$setup‪The local setup array from the function calling this function.
array | string$value‪The value/property pair array to set. If only one of them is set, then the other is not touched (unless $wipeOut is set, which it is when copies are made which must include both value and property)
bool$wipeOut‪If set, then both value and property is wiped out when a copy is made of another value.

Definition at line 689 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\$lastComment, TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\$setup, and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseNextKeySegment().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

◆ syntaxHighlight_print()

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::syntaxHighlight_print (   $lineNumDat,
  $highlightBlockMode 
)
protected

Formatting the TypoScript code in $this->raw based on the data collected by $this->regHighLight in $this->highLightData

Parameters
mixed$lineNumDat‪If blank, linenumbers are NOT printed. If array then the first key is the linenumber offset to add to the internal counter.
bool$highlightBlockMode‪If set, then the highlighted output will be formatted in blocks based on the brace levels. prespace will be ignored and empty lines represented with a single no-break-space.
Returns
‪string HTML content
See also
doSyntaxHighlight()

Definition at line 1442 of file TypoScriptParser.php.

References TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\$rawP, debug(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\modifyHTMLColorAll().

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\doSyntaxHighlight().

◆ typoscriptIncludeError()

static string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::typoscriptIncludeError (   $error)
staticprotected

Process errors in INCLUDE_TYPOSCRIPT tags Errors are logged and printed in the concatenated TypoScript result (as can be seen in Template Analyzer)

Parameters
string$error‪Text of the error message
Returns
‪string The error message encapsulated in comments

Definition at line 1202 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\checkIncludeLines(), and TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\importExternalTypoScriptFile().

Member Data Documentation

◆ $breakPointLN

int TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$breakPointLN = 0

Line for break point.

Definition at line 186 of file TypoScriptParser.php.

◆ $commentSet

bool TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$commentSet = false
protected

Internally set, used as internal flag to create a multi-line comment (one of those like /* ... * /

Definition at line 95 of file TypoScriptParser.php.

◆ $deprecatedPublicMethods

TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$deprecatedPublicMethods
protected
Initial value:
= array(
'nextDivider' => 'Using nextDivider() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'parseSub' => 'Using parseSub() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'rollParseSub' => 'Using rollParseSub() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'setVal' => 'Using setVal() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'error' => 'Using error() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'regHighLight' => 'Using regHighLight() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
'syntaxHighlight_print' => 'Using syntaxHighlight_print() of class TypoScriptParser from the outside is discouraged, as this method is only meant to be used internally.',
)

Definition at line 57 of file TypoScriptParser.php.

◆ $deprecatedPublicProperties

TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$deprecatedPublicProperties
protected
Initial value:
= array(
'raw' => 'Using $raw of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'rawP' => 'Using $rawP of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'lastComment' => 'Using $lastComment of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'commentSet' => 'Using $commentSet of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'multiLineEnabled' => 'Using $multiLineEnabled of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'multiLineObject' => 'Using $multiLineObject of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'multiLineValue' => 'Using $multiLineValue of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'inBrace' => 'Using $inBrace of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'lastConditionTrue' => 'Using $lastConditionTrue of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'syntaxHighLight' => 'Using $syntaxHighLight of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightData' => 'Using $highLightData of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightData_bracelevel' => 'Using $highLightData_bracelevel of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightStyles' => 'Using $highLightStyles of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightBlockStyles' => 'Using $highLightBlockStyles of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
'highLightBlockStyles_basecolor' => 'Using $highLightBlockStyles_basecolor of class TypoScriptParser from the outside is discouraged, as this variable is only used for internal storage.',
)

Definition at line 39 of file TypoScriptParser.php.

◆ $errors

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$errors = array( )

Error accumulation array.

Definition at line 174 of file TypoScriptParser.php.

◆ $highLightBlockStyles

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$highLightBlockStyles = ''
protected

Additional attributes for the tags for a blockmode line

Definition at line 224 of file TypoScriptParser.php.

◆ $highLightBlockStyles_basecolor

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$highLightBlockStyles_basecolor = '#cccccc'
protected

The hex-HTML color for the blockmode

Definition at line 230 of file TypoScriptParser.php.

◆ $highLightData

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$highLightData = array( )
protected

Syntax highlight data is accumulated in this array. Used by syntaxHighlight_print() to construct the output.

Definition at line 150 of file TypoScriptParser.php.

◆ $highLightData_bracelevel

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$highLightData_bracelevel = array( )
protected

Syntax highlight data keeping track of the curly brace level for each line

Definition at line 156 of file TypoScriptParser.php.

◆ $highLightStyles

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$highLightStyles
protected
Initial value:
= array(
'prespace' => ['<span class="ts-prespace">', '</span>'],
'objstr_postspace' => ['<span class="ts-objstr_postspace">', '</span>'],
'operator_postspace' => ['<span class="ts-operator_postspace">', '</span>'],
'operator' => ['<span class="ts-operator">', '</span>'],
'value' => ['<span class="ts-value">', '</span>'],
'objstr' => ['<span class="ts-objstr">', '</span>'],
'value_copy' => ['<span class="ts-value_copy">', '</span>'],
'value_unset' => ['<span class="ts-value_unset">', '</span>'],
'ignored' => ['<span class="ts-ignored">', '</span>'],
'default' => ['<span class="ts-default">', '</span>'],
'comment' => ['<span class="ts-comment">', '</span>'],
'condition' => ['<span class="ts-condition">', '</span>'],
'error' => ['<span class="ts-error">', '</span>'],
'linenum' => ['<span class="ts-linenum">', '</span>']
)

Definition at line 190 of file TypoScriptParser.php.

◆ $inBrace

int TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$inBrace = 0
protected

Internally set, when in brace. Counter.

Definition at line 119 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\regHighLight().

◆ $lastComment

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$lastComment = ''
protected

◆ $lastConditionTrue

bool TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$lastConditionTrue = true
protected

For each condition this flag is set, if the condition is TRUE, else it's cleared. Then it's used by the [ELSE] condition to determine if the next part should be parsed.

Definition at line 126 of file TypoScriptParser.php.

◆ $lineNumberOffset

int TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$lineNumberOffset = 0

Used for the error messages line number reporting. Set externally.

Definition at line 180 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\error().

◆ $multiLineEnabled

bool TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$multiLineEnabled = false
protected

Internally set, when multiline value is accumulated

Definition at line 101 of file TypoScriptParser.php.

◆ $multiLineObject

string TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$multiLineObject = ''
protected

Internally set, when multiline value is accumulated

Definition at line 107 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser\parseSub().

◆ $multiLineValue

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$multiLineValue = array( )
protected

Internally set, when multiline value is accumulated

Definition at line 113 of file TypoScriptParser.php.

◆ $parentObject

TYPO3 CMS Core TypoScript ExtendedTemplateService TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$parentObject

Definition at line 234 of file TypoScriptParser.php.

◆ $raw

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$raw
protected

Raw data, the input string exploded by LF

Definition at line 77 of file TypoScriptParser.php.

◆ $rawP

int TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$rawP
protected

◆ $regComments

bool TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$regComments = false

DO NOT register the comments. This is default for the ordinary sitetemplate!

Definition at line 162 of file TypoScriptParser.php.

◆ $regLinenumbers

bool TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$regLinenumbers = false

DO NOT register the linenumbers. This is default for the ordinary sitetemplate!

Definition at line 168 of file TypoScriptParser.php.

◆ $sections

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$sections = array( )

Tracking all conditions found

Definition at line 132 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Backend\Configuration\TsConfigParser\parseWithConditions().

◆ $sectionsMatch

array TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$sectionsMatch = array( )

Tracking all matching conditions found

Definition at line 138 of file TypoScriptParser.php.

Referenced by TYPO3\CMS\Backend\Configuration\TsConfigParser\parseWithConditions().

◆ $setup

◆ $syntaxHighLight

bool TYPO3\CMS\Core\TypoScript\Parser\TypoScriptParser::$syntaxHighLight = false
protected

If set, then syntax highlight mode is on; Call the function syntaxHighlight() to use this function

Definition at line 144 of file TypoScriptParser.php.