Documentation TYPO3 par Ameos

t3lib_matchCondition Class Reference

List of all members.

Public Member Functions

 match ($string)
 testNumber ($test, $value)
 matchWild ($haystack, $needle)
 whichDevice ($useragent)
 browserInfo ($useragent)
 browserInfo_version ($tmp)
 getGlobal ($var, $inArr='')
 getGP_ENV_TSFE ($var)
 match ($string)
 testNumber ($test, $value)
 matchWild ($haystack, $needle)
 whichDevice ($useragent)
 browserInfo ($useragent)
 browserInfo_version ($tmp)
 getGlobal ($var, $inArr='')
 getGP_ENV_TSFE ($var)

Public Attributes

 $matchAlternative = array()
 $matchAll = 0
 $altRootLine = array()

Detailed Description

Definition at line 77 of file class.t3lib_matchcondition.php.


Member Function Documentation

t3lib_matchCondition::browserInfo useragent  ) 
 

Generates an array with abstracted browser information In the function match() this method is called and the result stored in $this->browserInfoArray

Parameters:
string The useragent string, t3lib_div::getIndpEnv('HTTP_USER_AGENT')
Returns:
array Contains keys "browser", "version", "system" private
See also:
match()

Definition at line 413 of file class.t3lib_matchcondition.php.

References browserInfo_version().

t3lib_matchCondition::browserInfo useragent  ) 
 

Generates an array with abstracted browser information In the function match() this method is called and the result stored in $this->browserInfoArray

Parameters:
string The useragent string, t3lib_div::getIndpEnv('HTTP_USER_AGENT')
Returns:
array Contains keys "browser", "version", "system" private
See also:
match()

Definition at line 413 of file class.t3lib_matchcondition.php.

References browserInfo_version().

Referenced by match().

t3lib_matchCondition::browserInfo_version tmp  ) 
 

Returns the version of a browser; Basically getting doubleval() of the input string, stripping of any non-numeric values in the beginning of the string first.

Parameters:
string A string with version number, eg. "/7.32 blablabla"
Returns:
double Returns double value, eg. "7.32"

Definition at line 517 of file class.t3lib_matchcondition.php.

t3lib_matchCondition::browserInfo_version tmp  ) 
 

Returns the version of a browser; Basically getting doubleval() of the input string, stripping of any non-numeric values in the beginning of the string first.

Parameters:
string A string with version number, eg. "/7.32 blablabla"
Returns:
double Returns double value, eg. "7.32"

Definition at line 517 of file class.t3lib_matchcondition.php.

Referenced by browserInfo().

t3lib_matchCondition::getGlobal var,
inArr = ''
 

Return global variable where the input string $var defines array keys separated by "|"

Parameters:
string Global var key, eg. "HTTP_GET_VAR" or "HTTP_GET_VARS|id" to get the id GET parameter back.
array Alternative array than $GLOBAL to get variables from.
Returns:
mixed Whatever value. If none, then blank string. private

Definition at line 529 of file class.t3lib_matchcondition.php.

t3lib_matchCondition::getGlobal var,
inArr = ''
 

Return global variable where the input string $var defines array keys separated by "|"

Parameters:
string Global var key, eg. "HTTP_GET_VAR" or "HTTP_GET_VARS|id" to get the id GET parameter back.
array Alternative array than $GLOBAL to get variables from.
Returns:
mixed Whatever value. If none, then blank string. private

Definition at line 529 of file class.t3lib_matchcondition.php.

t3lib_matchCondition::getGP_ENV_TSFE var  ) 
 

Returns GP / ENV / TSFE vars

Parameters:
string Identifier
Returns:
mixed The value of the variable pointed to. private &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=311&cHash=487cbd5cdf

Definition at line 554 of file class.t3lib_matchcondition.php.

References t3lib_div::_GP(), and t3lib_div::getIndpEnv().

t3lib_matchCondition::getGP_ENV_TSFE var  ) 
 

Returns GP / ENV / TSFE vars

Parameters:
string Identifier
Returns:
mixed The value of the variable pointed to. private &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=311&cHash=487cbd5cdf

Definition at line 554 of file class.t3lib_matchcondition.php.

References t3lib_div::_GP(), and t3lib_div::getIndpEnv().

Referenced by match().

t3lib_matchCondition::match string  ) 
 

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

Parameters:
string The condition to match against its criterias.
Returns:
boolean Returns true or false based on the evaluation.
See also:
t3lib_tsparser::parse() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=292&cHash=c6c7d43d2f

Definition at line 91 of file class.t3lib_matchcondition.php.

References browserInfo(), t3lib_div::cmpFQDN(), t3lib_div::cmpIP(), getGP_ENV_TSFE(), t3lib_div::getIndpEnv(), t3lib_div::inList(), t3lib_div::isFirstPartOfStr(), matchWild(), t3lib_div::testInt(), testNumber(), t3lib_div::trimExplode(), and whichDevice().

t3lib_matchCondition::match string  ) 
 

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

Parameters:
string The condition to match against its criterias.
Returns:
boolean Returns true or false based on the evaluation.
See also:
t3lib_tsparser::parse() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=292&cHash=c6c7d43d2f

Definition at line 91 of file class.t3lib_matchcondition.php.

References browserInfo(), t3lib_div::cmpFQDN(), t3lib_div::cmpIP(), getGP_ENV_TSFE(), t3lib_div::getIndpEnv(), t3lib_div::inList(), t3lib_div::isFirstPartOfStr(), matchWild(), t3lib_div::testInt(), testNumber(), t3lib_div::trimExplode(), and whichDevice().

t3lib_matchCondition::matchWild haystack,
needle
 

Matching two strings against each other, supporting a "*" wildcard in either end of the $needle

Parameters:
string The string in which to find $needle.
string The string to find in $haystack
Returns:
boolean Returns true if $needle matches or is found in (according to wildcards) in $haystack. Eg. if $haystack is "Netscape 6.5" and $needle is "Net*" or "Netscape*" then it returns true.

Definition at line 333 of file class.t3lib_matchcondition.php.

t3lib_matchCondition::matchWild haystack,
needle
 

Matching two strings against each other, supporting a "*" wildcard in either end of the $needle

Parameters:
string The string in which to find $needle.
string The string to find in $haystack
Returns:
boolean Returns true if $needle matches or is found in (according to wildcards) in $haystack. Eg. if $haystack is "Netscape 6.5" and $needle is "Net*" or "Netscape*" then it returns true.

Definition at line 333 of file class.t3lib_matchcondition.php.

Referenced by match().

t3lib_matchCondition::testNumber test,
value
 

Will evaluate a $value based on an operator: "<", ">" or "=" (default)

Parameters:
string The value to compare with on the form [operator][number]. Eg. "< 123"
integer The number
Returns:
boolean If $value is "50" and $test is "< 123" then it will return true.

Definition at line 311 of file class.t3lib_matchcondition.php.

t3lib_matchCondition::testNumber test,
value
 

Will evaluate a $value based on an operator: "<", ">" or "=" (default)

Parameters:
string The value to compare with on the form [operator][number]. Eg. "< 123"
integer The number
Returns:
boolean If $value is "50" and $test is "< 123" then it will return true.

Definition at line 311 of file class.t3lib_matchcondition.php.

Referenced by match().

t3lib_matchCondition::whichDevice useragent  ) 
 

Returns a code for a browsing device based on the input useragent string

Parameters:
string User agent string from browser, t3lib_div::getIndpEnv('HTTP_USER_AGENT')
Returns:
string A code. See link. private &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=296&cHash=a8ae66c7d6

Definition at line 363 of file class.t3lib_matchcondition.php.

t3lib_matchCondition::whichDevice useragent  ) 
 

Returns a code for a browsing device based on the input useragent string

Parameters:
string User agent string from browser, t3lib_div::getIndpEnv('HTTP_USER_AGENT')
Returns:
string A code. See link. private &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=296&cHash=a8ae66c7d6

Definition at line 363 of file class.t3lib_matchcondition.php.

Referenced by match().


The documentation for this class was generated from the following files:


Généré par TYPO3 Ameos avec  doxygen 1.4.6