Solutions Open Source

Référence de la classe t3lib_matchCondition

Liste de tous les membres

Fonctions membres publiques

 __construct ()
 t3lib_matchCondition ()
 match ($condition_line)
 evalConditionStr ($string)
 testNumber ($test, $value)
 matchWild ($haystack, $needle)
 whichDevice ($useragent)
 browserInfo ($useragent)
 browserInfo_version ($tmp)
 getGlobal ($var, $source=NULL)
 getGP_ENV_TSFE ($var)

Attributs publics

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


Documentation des contructeurs et destructeur

t3lib_matchCondition::__construct (  ) 

Constructor for this class

Renvoie:
void


Documentation des fonctions membres

t3lib_matchCondition::t3lib_matchCondition (  ) 

Constructor for this class

Renvoie:
void

t3lib_matchCondition::match ( condition_line  ) 

Matching TS condition

Paramètres:
string Line to match
Renvoie:
boolean True if matched

t3lib_matchCondition::evalConditionStr ( string  ) 

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

Paramètres:
string The condition to match against its criterias.
Renvoie:
boolean Returns true or false based on the evaluation.
Voir également:
t3lib_tsparser::parse() &tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=292&cHash=c6c7d43d2f

t3lib_matchCondition::testNumber ( test,
value 
)

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

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

t3lib_matchCondition::matchWild ( haystack,
needle 
)

Matching two strings against each other, supporting a "*" wildcard or (if wrapped in "/") PCRE regular expressions

Paramètres:
string The string in which to find $needle.
string The string to find in $haystack
Renvoie:
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 "Net*ape" then it returns true.

t3lib_matchCondition::whichDevice ( useragent  ) 

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

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

t3lib_matchCondition::browserInfo ( useragent  ) 

Generates an array with abstracted browser information This method is used in the function match() in this class

Paramètres:
string The useragent string, t3lib_div::getIndpEnv('HTTP_USER_AGENT')
Renvoie:
array Contains keys "browser", "version", "system" private
Voir également:
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.

Paramètres:
string A string with version number, eg. "/7.32 blablabla"
Renvoie:
double Returns double value, eg. "7.32"

t3lib_matchCondition::getGlobal ( var,
source = NULL 
)

Return global variable where the input string $var defines array keys separated by "|" Example: $var = "HTTP_SERVER_VARS | something" will return the value $GLOBALS['HTTP_SERVER_VARS']['something'] value

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

t3lib_matchCondition::getGP_ENV_TSFE ( var  ) 

Returns GP / ENV / TSFE vars

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


Documentation des données membres

t3lib_matchCondition::$matchAlternative = array()

t3lib_matchCondition::$matchAll = 0

t3lib_matchCondition::$altRootLine = array()

t3lib_matchCondition::$hookObjectsArr = array()


La documentation de cette classe a été générée à partir du fichier suivant :
Généré le Fri Aug 31 11:42:20 2007 pour OBLADY - Typo3 API v4.1.2 par  doxygen 1.5.3