TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher:
TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher t3lib_matchCondition_frontend

Protected Member Functions

 evaluateCondition ($string)
 
 getVariable ($var)
 
 getGroupList ()
 
 determinePageId ()
 
 getPage ()
 
 determineRootline ()
 
 getUserId ()
 
 isUserLoggedIn ()
 
 log ($message)
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 normalizeExpression ($expression)
 
 evaluateConditionCommon ($key, $value)
 
 parseUserFuncArguments ($arguments)
 
 getVariableCommon (array $vars)
 
 compareNumber ($test, $leftValue)
 
 searchStringWildcard ($haystack, $needle)
 
 getBrowserInfo ($userAgent)
 
 getDeviceType ($userAgent)
 
 getGlobal ($var, $source=NULL)
 
 evaluateCondition ($string)
 
 getVariable ($name)
 
 getGroupList ()
 
 determinePageId ()
 
 getPage ()
 
 determineRootline ()
 
 getUserId ()
 
 isUserLoggedIn ()
 
 log ($message)
 

Additional Inherited Members

- Public Member Functions inherited from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 setPageId ($pageId)
 
 getPageId ()
 
 setRootline (array $rootline)
 
 getRootline ()
 
 setSimulateMatchResult ($simulateMatchResult)
 
 setSimulateMatchConditions (array $simulateMatchConditions)
 
 match ($expression)
 
- Protected Attributes inherited from TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher
 $pageId
 
 $rootline
 
 $simulateMatchResult = FALSE
 
 $simulateMatchConditions = array()
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Matching TypoScript conditions for frontend disposal.

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

Author
Kasper Skårhøj kaspe.nosp@m.rYYY.nosp@m.Y@typ.nosp@m.o3.c.nosp@m.om

Definition at line 24 of file ConditionMatcher.php.

Member Function Documentation

◆ determinePageId()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::determinePageId ( )
protected

Determines the current page Id.

Returns
integer The current page Id

Definition at line 118 of file ConditionMatcher.php.

References $GLOBALS.

◆ determineRootline()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::determineRootline ( )
protected

Determines the rootline for the current page.

Returns
array The rootline for the current page.

Definition at line 136 of file ConditionMatcher.php.

References $GLOBALS, and TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\$rootline.

◆ evaluateCondition()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::evaluateCondition (   $string)
protected

Evaluates a TypoScript condition given as input, eg. "[browser=net][...(other conditions)...]"

Parameters
string$stringThe condition to match against its criterias.
Returns
boolean Whether the condition matched
See also
::parse()

Definition at line 33 of file ConditionMatcher.php.

References $result, TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\evaluateConditionCommon(), TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\getGroupList(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

◆ getGroupList()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getGroupList ( )
protected

Get the usergroup list of the current user.

Returns
string The usergroup list of the current user

Definition at line 108 of file ConditionMatcher.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher\evaluateCondition().

◆ getPage()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getPage ( )
protected

Gets the properties for the current page.

Returns
array The properties for the current page.

Definition at line 127 of file ConditionMatcher.php.

References $GLOBALS.

◆ getUserId()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getUserId ( )
protected

Get the id of the current user.

Returns
integer The id of the current user

Definition at line 146 of file ConditionMatcher.php.

References $GLOBALS.

◆ getVariable()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::getVariable (   $var)
protected

Returns GP / ENV / TSFE vars

Parameters
string$varIdentifier
Returns
mixed The value of the variable pointed to or NULL if variable did not exist

Definition at line 86 of file ConditionMatcher.php.

References TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\getGlobal(), and TYPO3\CMS\Core\Configuration\TypoScript\ConditionMatching\AbstractConditionMatcher\getVariableCommon().

◆ isUserLoggedIn()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::isUserLoggedIn ( )
protected

Determines if a user is logged in.

Returns
boolean Determines if a user is logged in

Definition at line 156 of file ConditionMatcher.php.

References $GLOBALS.

◆ log()

TYPO3\CMS\Frontend\Configuration\TypoScript\ConditionMatching\ConditionMatcher::log (   $message)
protected

Set/write a log message.

Parameters
string$messageThe log message to set/write
Returns
void

Definition at line 170 of file ConditionMatcher.php.

References $GLOBALS.