ConditionMatcher extends AbstractConditionMatcher

Matching TypoScript conditions for backend disposal.

Used with the TypoScript parser. Matches browserinfo, IP numbers for use with templates

Table of Contents

Properties

$context  : Context
$expressionLanguageResolver  : Resolver
$expressionLanguageResolverVariables  : array<string|int, mixed>
$pageId  : int
Id of the current page.
$rootline  : array<string|int, mixed>
The rootline for the current page.
$simulateMatchConditions  : array<string|int, mixed>
Whether to simulate the behaviour and match specific conditions (used in TypoScript object browser).
$simulateMatchResult  : bool
Whether to simulate the behaviour and match all conditions (used in TypoScript object browser).

Methods

__construct()  : mixed
getPageId()  : int
Gets the id of the page to evaluate conditions for.
getRootline()  : array<string|int, mixed>
Gets the rootline.
match()  : bool
Matches a TypoScript condition expression.
setPageId()  : mixed
Sets the id of the page to evaluate conditions for.
setRootline()  : mixed
Sets the rootline.
setSimulateMatchConditions()  : mixed
Sets whether to simulate the behaviour and match specific conditions.
setSimulateMatchResult()  : mixed
Sets whether to simulate the behaviour and match all conditions.
evaluateExpression()  : bool
initializeExpressionLanguageResolver()  : void
updateExpressionLanguageVariables()  : void

Properties

$expressionLanguageResolverVariables

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

$pageId

Id of the current page.

protected int $pageId

$rootline

The rootline for the current page.

protected array<string|int, mixed> $rootline

$simulateMatchConditions

Whether to simulate the behaviour and match specific conditions (used in TypoScript object browser).

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

$simulateMatchResult

Whether to simulate the behaviour and match all conditions (used in TypoScript object browser).

protected bool $simulateMatchResult = false

Methods

__construct()

public __construct([Context|null $context = null ][, int|null $pageId = null ][, array<string|int, mixed>|null $rootLine = null ]) : mixed
Parameters
$context : Context|null = null
$pageId : int|null = null
$rootLine : array<string|int, mixed>|null = null

getPageId()

Gets the id of the page to evaluate conditions for.

public getPageId() : int
Return values
int

Id of the page

getRootline()

Gets the rootline.

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

The rootline to be used for matching

match()

Matches a TypoScript condition expression.

public match(string $expression) : bool
Parameters
$expression : string

The expression to match

Return values
bool

Whether the expression matched

setPageId()

Sets the id of the page to evaluate conditions for.

public setPageId(int $pageId) : mixed
Parameters
$pageId : int

Id of the page (must be positive)

setRootline()

Sets the rootline.

public setRootline(array<string|int, mixed> $rootline) : mixed
Parameters
$rootline : array<string|int, mixed>

The rootline to be used for matching (must have elements)

setSimulateMatchConditions()

Sets whether to simulate the behaviour and match specific conditions.

public setSimulateMatchConditions(array<string|int, mixed> $simulateMatchConditions) : mixed
Parameters
$simulateMatchConditions : array<string|int, mixed>

Conditions to simulate a match for

setSimulateMatchResult()

Sets whether to simulate the behaviour and match all conditions.

public setSimulateMatchResult(bool $simulateMatchResult) : mixed
Parameters
$simulateMatchResult : bool

Whether to simulate positive matches

evaluateExpression()

protected evaluateExpression(string $expression) : bool
Parameters
$expression : string
Return values
bool

initializeExpressionLanguageResolver()

protected initializeExpressionLanguageResolver() : void

updateExpressionLanguageVariables()

protected updateExpressionLanguageVariables() : void

        
On this page

Search results