Documentation TYPO3 par Ameos

t3lib_div Class Reference

List of all members.

Public Member Functions

 trimExplode ($delim, $string, $onlyNonEmptyValues=0)
 dirname ($path)
 revExplode ($delim, $string, $count=0)
 getIndpEnv ($getEnvName)
 _GP ($var)
 _GET ($var=NULL)
 _POST ($var=NULL)
 _GETset ($inputGet, $key='')
 GPvar ($var, $strip=0)
 GParrayMerged ($var)
 gif_compress ($theFile, $type)
 png_to_gif_by_imagemagick ($theFile)
 read_png_gif ($theFile, $output_png=0)
 fixed_lgd ($string, $origChars, $preStr='...')
 fixed_lgd_pre ($string, $chars)
 fixed_lgd_cs ($string, $chars)
 breakTextForEmail ($str, $implChar="\n", $charWidth=76)
 breakLinesForEmail ($str, $implChar="\n", $charWidth=76)
 cmpIP ($baseIP, $list)
 cmpIPv4 ($baseIP, $list)
 cmpIPv6 ($baseIP, $list)
 IPv6Hex2Bin ($hex)
 normalizeIPv6 ($address)
 validIPv6 ($ip)
 cmpFQDN ($baseIP, $list)
 inList ($list, $item)
 rmFromList ($element, $list)
 expandList ($list)
 intInRange ($theInt, $min, $max=2000000000, $zeroValue=0)
 intval_positive ($theInt)
 int_from_ver ($verNumberStr)
 compat_version ($verNumberStr)
 md5int ($str)
 shortMD5 ($input, $len=10)
 uniqueList ($in_list, $secondParameter=NULL)
 split_fileref ($fileref)
 dirname ($path)
 modifyHTMLColor ($color, $R, $G, $B)
 modifyHTMLColorAll ($color, $all)
 rm_endcomma ($string)
 danish_strtoupper ($string)
 convUmlauts ($str)
 testInt ($var)
 isFirstPartOfStr ($str, $partStr)
 formatSize ($sizeInBytes, $labels='')
 convertMicrotime ($microtime)
 splitCalc ($string, $operators)
 calcPriority ($string)
 calcParenthesis ($string)
 htmlspecialchars_decode ($value)
 deHSCentities ($str)
 slashJS ($string, $extended=0, $char="'")
 rawUrlEncodeJS ($str)
 rawUrlEncodeFP ($str)
 validEmail ($email)
 formatForTextarea ($content)
 inArray ($in_array, $item)
 intExplode ($delim, $string)
 revExplode ($delim, $string, $count=0)
 trimExplode ($delim, $string, $onlyNonEmptyValues=0)
 uniqueArray ($valueArray)
 removeArrayEntryByValue ($array, $cmpValue)
 implodeArrayForUrl ($name, $theArray, $str='', $skipBlank=0, $rawurlencodeParamName=0)
 explodeUrl2Array ($string, $multidim=FALSE)
 compileSelectedGetVarsFromArray ($varList, $getArray, $GPvarAlt=1)
 addSlashesOnArray (&$theArray)
 stripSlashesOnArray (&$theArray)
 slashArray ($arr, $cmd)
 array_merge_recursive_overrule ($arr0, $arr1, $notAddKeys=0, $includeEmtpyValues=true)
 array_merge ($arr1, $arr2)
 csvValues ($row, $delim=',', $quote='"')
 get_tag_attributes ($tag)
 split_tag_attributes ($tag)
 implodeAttributes ($arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE)
 implodeParams ($arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE)
 wrapJS ($string, $linebreak=TRUE)
 xml2tree ($string, $depth=999)
 array2xml_cs ($array, $docTag='phparray', $options=array(), $charset='')
 array2xml ($array, $NSprefix='', $level=0, $docTag='phparray', $spaceInd=0, $options=array(), $stackData=array())
 xml2array ($string, $NSprefix='', $reportDocTag=FALSE)
 xmlRecompileFromStructValArray ($vals)
 xmlGetHeaderAttribs ($xmlData)
 getURL ($url, $includeHeader=0)
 writeFile ($file, $content)
 fixPermissions ($file)
 writeFileToTypo3tempDir ($filepath, $content)
 mkdir ($theNewFolder)
 mkdir_deep ($destination, $deepDir)
 get_dirs ($path)
 getFilesInDir ($path, $extensionList='', $prependPath=0, $order='')
 getAllFilesAndFoldersInPath ($fileArr, $path, $extList='', $regDirs=0, $recursivityLevels=99)
 removePrefixPathFromList ($fileArr, $prefixToRemove)
 fixWindowsFilePath ($theFile)
 resolveBackPath ($pathStr)
 locationHeaderUrl ($path)
 debug_ordvalue ($string, $characters=100)
 view_array ($array_in)
 print_array ($array_in)
 debug ($var="", $brOrHeader=0)
 debug_trail ()
 debugRows ($rows, $header='')
 getThisUrl ()
 linkThisScript ($getParams=array())
 linkThisUrl ($url, $getParams=array())
 getIndpEnv ($getEnvName)
 milliseconds ()
 clientInfo ($useragent='')
 getFileAbsFileName ($filename, $onlyRelative=1, $relToTYPO3_mainDir=0)
 validPathStr ($theFile)
 isAbsPath ($path)
 isAllowedAbsPath ($path)
 verifyFilenameAgainstDenyPattern ($filename)
 upload_copy_move ($source, $destination)
 upload_to_tempfile ($uploadedFileName)
 unlink_tempfile ($uploadedTempFileName)
 tempnam ($filePrefix)
 stdAuthCode ($uid_or_record, $fields='', $codeLength=8)
 cHashParams ($addQueryParams)
 hideIfNotTranslated ($l18n_cfg_fieldValue)
 readLLfile ($fileRef, $langKey)
 readLLXMLfile ($fileRef, $langKey)
 llXmlAutoFileName ($fileRef, $language)
 loadTCA ($table)
 resolveSheetDefInDS ($dataStructArray, $sheet='sDEF')
 resolveAllSheetsInDS ($dataStructArray)
 callUserFunction ($funcName, &$params, &$ref, $checkPrefix='user_', $silent=0)
getUserObj ($classRef, $checkPrefix='user_', $silent=0)
makeInstance ($className)
 makeInstanceClassName ($className)
makeInstanceService ($serviceType, $serviceSubType='', $excludeServiceKeys=array())
 plainMailEncoded ($email, $subject, $message, $headers='', $enc='', $charset='', $dontEncodeHeader=false)
 quoted_printable ($string, $maxlen=76)
 encodeHeader ($line, $enc='', $charset='ISO-8859-1')
 substUrlsInPlainText ($message, $urlmode='76', $index_script_url='')
 makeRedirectUrl ($inUrl, $l=0, $index_script_url='')
 freetypeDpiComp ($font_size)
 initSysLog ()
 sysLog ($msg, $extKey, $severity=0)
 devLog ($msg, $extKey, $severity=0, $dataVar=FALSE)
 arrayToLogString ($arr, $valueList=array(), $valueLength=20)
 imageMagickCommand ($command, $parameters, $path='')
 unQuoteFilenames ($parameters, $unQuote=FALSE)
 quoteJSvalue ($value, $inScriptTags=false)

Detailed Description

Definition at line 10 of file incfile.php.


Member Function Documentation

t3lib_div::_GET var = NULL  ) 
 

Returns the global GET array (or value from) normalized to contain un-escaped values. ALWAYS use this API function to acquire the GET variables! Usage: 27

Parameters:
string Optional pointer to value in GET array (basically name of GET var)
Returns:
mixed If $var is set it returns the value of $_GET[$var]. If $var is NULL (default), returns $_GET itself. In any case *slashes are stipped from the output!*
See also:
_POST(), _GP(), _GETset()

Definition at line 280 of file class.t3lib_div.php.

References stripSlashesOnArray().

Referenced by SC_alt_main::editPageHandling(), t3lib_tsfeBeUserAuth::extPrintFeAdminDialog(), t3lib_tsfeBeUserAuth::extSaveFeAdminConfig(), SC_mod_tools_dbint_index::func_records(), tslib_cObj::getQueryArguments(), SC_show_item::init(), linkThisScript(), tx_tstemplateobjbrowser::main(), tx_tstemplateanalyzer::main(), SC_file_list::main(), SC_db_list::main(), SC_alt_clickmenu::main(), SC_mod_tools_config_index::main(), SC_mod_user_ws_index::main(), tslib_fe::makeCacheHash(), template::makeShortcutUrl(), tslib_fe::mergingWithGetVars(), tx_tstemplateobjbrowser::modMenu(), SC_alt_doc::preInit(), t3lib_TStemplate::processTemplate(), t3lib_userAuth::start(), SC_alt_main::startModule(), and SC_mod_tools_em_index::translationHandling().

t3lib_div::_GETset inputGet,
key = ''
 

Writes input value to $_GET Usage: 2

Parameters:
array Array to write to $_GET. Values should NOT be escaped at input time (but will be escaped before writing according to TYPO3 standards).
string Alternative key; If set, this will not set the WHOLE GET array, but only the key in it specified by this value!
Returns:
void

Definition at line 313 of file class.t3lib_div.php.

References addSlashesOnArray().

Referenced by tslib_fe::ADMCMD_preview(), tslib_fe::mergingWithGetVars(), and tx_rtehtmlarea_select_image::preinit().

t3lib_div::_GP var  ) 
 

Returns the 'GLOBAL' value of incoming data from POST or GET, with priority to POST (that is equalent to 'GP' order) Strips slashes from all output, both strings and arrays. This function substitutes t3lib_div::GPvar() To enhancement security in your scripts, please consider using t3lib_div::_GET or t3lib_div::_POST if you already know by which method your data is arriving to the scripts! Usage: 537

Parameters:
string GET/POST var to return
Returns:
mixed POST var named $var and if not set, the GET var of the same name.
See also:
GPvar()

Definition at line 262 of file class.t3lib_div.php.

References stripSlashesOnArray().

Referenced by tx_sysaction::action_t1_createUpdateBeUser(), tslib_fe::ADMCMD_preview(), SC_mod_tools_em_index::checkDBupdates(), t3lib_SCbase::checkExtObj(), tx_install::checkPassword(), SC_mod_tools_log_index::checkUpload(), t3lib_TCEmain::checkValue_flex(), SC_mod_web_ts_index::clearCache(), SC_mod_tools_be_user_index::compareUsers(), SC_mod_web_ts_index::createTemplate(), tslib_fe::determineId(), user_feAdmin::displayCreateScreen(), user_feAdmin::displayEditForm(), recordHistory::displaySettings(), tx_version_cm1::displayWorkspaceOverview(), tslib_cObj::editIcons(), tslib_cObj::editPanel(), tslib_cObj::editPanelLinkWrap(), tx_rtehtmlarea_select_image::expandFolder(), localPageTree::ext_tree(), t3lib_tsfeBeUserAuth::extGetCategory_edit(), SC_mod_tools_dbint_index::func_filesearch(), SC_mod_tools_dbint_index::func_refindex(), tx_install::generateConfigForm(), wsol_preview::generateUrls(), tslib_cObj::getData(), tslib_cObj::getFieldDefaultValue(), t3lib_matchCondition::getGP_ENV_TSFE(), t3lib_userAuth::getLoginFormData(), SC_mod_user_ws_workspaceForms::getModuleParameters(), t3lib_fullsearch::getQueryResultCode(), t3lib_TCEforms::getSingleField_typeFlex(), t3lib_extobjbase::handleExternalFunctionValue(), SC_wizard_tsconfig::init(), SC_wizard_table::init(), SC_wizard_rte::init(), SC_wizard_list::init(), SC_wizard_forms::init(), SC_wizard_edit::init(), SC_wizard_colorpicker::init(), SC_wizard_add::init(), SC_view_help::init(), SC_tce_file::init(), SC_tce_db::init(), tx_rtehtmlarea_parse_html::init(), user_feAdmin::init(), SC_db_new_content_el::init(), SC_db_layout::init(), SC_move_el::init(), SC_mod_tools_em_index::init(), SC_file_upload::init(), SC_file_rename::init(), SC_file_newfolder::init(), SC_file_list::init(), SC_file_edit::init(), SC_db_new::init(), SC_db_list::init(), browse_links::init(), tx_rtehtmlarea_browse_links::init(), SC_browse_links::init(), SC_alt_palette::init(), SC_alt_menu::init(), SC_alt_file_navframe::init(), SC_alt_doc::init(), SC_alt_db_navframe::init(), SC_alt_clickmenu::init(), clickMenu::init(), t3lib_SCbase::init(), SC_mod_web_view_index::init(), SC_mod_web_ts_index::init(), SC_mod_tools_be_user_index::init(), SC_mod_web_perm_index::init(), SC_index::init(), tslib_fe::initFEuser(), t3lib_treeView::initializePositionSaving(), t3lib_folderTree::initializePositionSaving(), tx_install::isTTF(), SC_alt_doc::localizationRedirect(), tx_install::loginForm(), SC_logout::logout(), tx_rtehtmlarea_select_image::magicProcess(), SC_wizard_colorpicker::main(), tx_wizardsortpages_webfunc_2::main(), tx_wizardcrpages_webfunc_2::main(), tx_tstemplateobjbrowser::main(), tx_tstemplateinfo::main(), tx_tstemplateceditor::main(), tx_rtehtmlarea_parse_html::main(), tx_rtehtmlarea_select_image::main(), tx_indexedsearch_modfunc1::main(), tx_impexp_modfunc1::main(), tx_impexp_clickmenu::main(), tx_extrapagecmoptions::main(), tx_adodb_checkconnectionwizard::main(), SC_show_item::main(), wsol_preview::main(), SC_mod_user_ws_workspaceForms::main(), recordHistory::main(), SC_browser::main(), SC_alt_mod_frameset::main(), SC_alt_clickmenu::main(), tx_version_cm1::main(), SC_mod_tools_config_index::main(), SC_mod_tools_log_index::main(), tx_dbal_module1::main(), SC_mod_tools_be_user_index::main(), tx_rtehtmlarea_acronym::main_acronym(), browse_links::main_file(), tx_rtehtmlarea_browse_links::main_file(), tx_rtehtmlarea_parse_html::main_parse_html(), tx_rtehtmlarea_user::main_user(), SC_db_layout::menuConfig(), SC_mod_tools_em_index::menuConfig(), SC_file_list::menuConfig(), SC_db_list::menuConfig(), t3lib_SCbase::menuConfig(), tx_version_cm1::menuConfig(), SC_mod_tools_dbint_index::menuConfig(), SC_mod_tools_config_index::menuConfig(), SC_mod_tools_isearch_index::menuConfig(), SC_mod_tools_be_user_index::menuConfig(), SC_mod_tools_log_index::menuConfig(), SC_mod_web_perm_index::menuConfig(), SC_mod_user_ws_index::menuConfig(), tx_lowlevel_cleaner::moduleContent(), SC_mod_user_ws_index::moduleContent_publish(), user_feAdmin::parseValues(), tx_rtehtmlarea_select_image::preinit(), SC_alt_shortcut::preinit(), SC_alt_doc::preInit(), tx_dbal_module1::printSqlCheck(), SC_mod_user_ws_workspaceForms::processData(), SC_alt_doc::processData(), user_feAdmin::procesSetFixed(), SC_mod_tools_log_index::processPresets(), t3lib_modSettings::processStoreControl(), t3lib_fullsearch::procesStoreControl(), recordHistory::recordHistory(), template::redirectUrls(), tx_sysaction::renderActions(), SC_mod_tools_em_index::requestInstallExtensions(), recordHistory::resolveShUid(), tslib_cObj::SEARCHRESULT(), user_feAdmin::sendInfoMail(), SC_mod_tools_em_index::showExtDetails(), SC_mod_user_setup_index::simulateUser(), recordList::start(), SC_mod_user_setup_index::storeIncomingData(), SC_mod_tools_be_user_index::switchUser(), browse_links::TBE_dragNDrop(), tx_rtehtmlarea_browse_links::TBE_dragNDrop(), SC_mod_web_ts_index::templateMenu(), alt_menu_functions::topMenu(), SC_mod_tools_em_index::tsStyleConfigForm(), and tx_install::tx_install().

t3lib_div::_POST var = NULL  ) 
 

Returns the global POST array (or value from) normalized to contain un-escaped values. ALWAYS use this API function to acquire the POST variables! Usage: 41

Parameters:
string Optional pointer to value in POST array (basically name of POST var)
Returns:
mixed If $var is set it returns the value of $_POST[$var]. If $var is NULL (default), returns $_POST itself. In any case *slashes are stipped from the output!*
See also:
_GET(), _GP()

Definition at line 297 of file class.t3lib_div.php.

References stripSlashesOnArray().

Referenced by tslib_fe::ADMCMD_preview(), SC_mod_tools_em_index::checkClearCache(), SC_mod_tools_em_index::checkUploadFolder(), SC_wizard_colorpicker::colorImage(), tslib_cObj::editPanel(), t3lib_tsfeBeUserAuth::extInitFeAdmin(), t3lib_userAuth::getLoginFormData(), tslib_cObj::getQueryArguments(), SC_mod_tools_log_index::importData(), tx_tstemplateobjbrowser::main(), tx_tstemplateinfo::main(), tx_tstemplateceditor::main(), tx_rtehtmlarea_pi1::main(), tx_indexedsearch_modfunc1::main(), SC_file_list::main(), SC_db_list::main(), SC_mod_tools_config_index::main(), t3lib_queryGenerator::procesData(), tx_version_cm1::publishAction(), SC_mod_user_ws_index::publishAction(), SC_mod_tools_em_index::requestInstallExtensions(), tslib_cObj::SEARCHRESULT(), SC_mod_tools_em_index::showExtDetails(), SC_mod_user_setup_index::storeIncomingData(), SC_mod_tools_em_index::translationHandling(), SC_mod_tools_em_index::tsStyleConfigForm(), tx_version_cm1::versioningMgm(), and tx_version_cm1::workspaceMgm().

t3lib_div::addSlashesOnArray &$  theArray  ) 
 

AddSlash array This function traverses a multidimentional array and adds slashes to the values. NOTE that the input array is and argument by reference.!! Twin-function to stripSlashesOnArray Usage: 8

Parameters:
array Multidimensional input array, (REFERENCE!)
Returns:
array

Definition at line 1587 of file class.t3lib_div.php.

Referenced by _GETset().

t3lib_div::array2xml array,
NSprefix = '',
level = 0,
docTag = 'phparray',
spaceInd = 0,
options = array(),
stackData = array()
 

Deprecated to call directly (unless you are aware of using XML prologues)! Use "array2xml_cs" instead (which adds an XML-prologue)

Converts a PHP array into an XML string. The XML output is optimized for readability since associative keys are used as tagnames. This also means that only alphanumeric characters are allowed in the tag names AND only keys NOT starting with numbers (so watch your usage of keys!). However there are options you can set to avoid this problem. Numeric keys are stored with the default tagname "numIndex" but can be overridden to other formats) The function handles input values from the PHP array in a binary-safe way; All characters below 32 (except 9,10,13) will trigger the content to be converted to a base64-string The PHP variable type of the data IS preserved as long as the types are strings, arrays, integers and booleans. Strings are the default type unless the "type" attribute is set. The output XML has been tested with the PHP XML-parser and parses OK under all tested circumstances with 4.x versions. However, with PHP5 there seems to be the need to add an XML prologue a la <?xml version="1.0" encoding="[charset]" standalone="yes" ?> - otherwise UTF-8 is assumed! Unfortunately, many times the output from this function is used without adding that prologue meaning that non-ASCII characters will break the parsing!! This suchs of course! Effectively it means that the prologue should always be prepended setting the right characterset, alternatively the system should always run as utf-8! However using MSIE to read the XML output didn't always go well: One reason could be that the character encoding is not observed in the PHP data. The other reason may be if the tag-names are invalid in the eyes of MSIE. Also using the namespace feature will make MSIE break parsing. There might be more reasons... Usage: 5

Parameters:
array The input PHP array with any kind of data; text, binary, integers. Not objects though.
string tag-prefix, eg. a namespace prefix like "T3:"
integer Current recursion level. Don't change, stay at zero!
string Alternative document tag. Default is "phparray".
integer If set, the number of spaces corresponding to this number is used for indenting, otherwise a single chr(9) (TAB) is used
array Options for the compilation. Key "useNindex" => 0/1 (boolean: whether to use "n0, n1, n2" for num. indexes); Key "useIndexTagForNum" => "[tag for numerical indexes]"; Key "useIndexTagForAssoc" => "[tag for associative indexes"; Key "parentTagMap" => array('parentTag' => 'thisLevelTag')
string Stack data. Don't touch.
Returns:
string An XML string made from the input content in the array.
See also:
xml2array()

Definition at line 1999 of file class.t3lib_div.php.

References testInt().

Referenced by array2xml_cs(), t3lib_flexformtools::flexArray2Xml(), tx_dbal_handler_xmldb::saveDataSource(), and tx_dbal_handler_xmldb::xmlDB_writeStructure().

t3lib_div::array2xml_cs array,
docTag = 'phparray',
options = array(),
charset = ''
 

Turns PHP array into XML. See array2xml()

Parameters:
array The input PHP array with any kind of data; text, binary, integers. Not objects though.
string Alternative document tag. Default is "phparray".
array Options for the compilation. See array2xml() for description.
string Forced charset to prologue
Returns:
string An XML string made from the input content in the array.
See also:
xml2array(),array2xml()

Definition at line 1958 of file class.t3lib_div.php.

References array2xml().

Referenced by SC_wizard_table::getConfigCode(), and SC_wizard_forms::getConfigCode().

t3lib_div::array_merge arr1,
arr2
 

An array_merge function where the keys are NOT renumbered as they happen to be with the real php-array_merge function. It is "binary safe" in the sense that integer keys are overridden as well. Usage: 16

Parameters:
array First array
array Second array
Returns:
array Merged result.

Definition at line 1683 of file class.t3lib_div.php.

Referenced by breakTextForEmail(), and tslib_feUserAuth::fetchGroupData().

t3lib_div::array_merge_recursive_overrule arr0,
arr1,
notAddKeys = 0,
includeEmtpyValues = true
 

Merges two arrays recursively and "binary safe" (integer keys are overridden as well), overruling similar values in the first array ($arr0) with the values of the second array ($arr1) In case of identical keys, ie. keeping the values of the second. Usage: 0

Parameters:
array First array
array Second array, overruling the first array
boolean If set, keys that are NOT found in $arr0 (first array) will not be set. Thus only existing value can/will be overruled from second array.
boolean If set, values from $arr1 will overrule if they are empty. Default: true
Returns:
array Resulting array where $arr1 values has overruled $arr0 values

Definition at line 1650 of file class.t3lib_div.php.

Referenced by tx_rtehtmlarea_base::buildJSLangArray(), t3lib_TCEmain::checkValue_flex(), t3lib_tsStyleConfig::ext_mergeIncomingWithExisting(), t3lib_TCEmain::fillInFieldArray(), t3lib_BEfunc::getModTSconfig(), t3lib_BEfunc::getPagesTSconfig(), t3lib_TCEmain::getTableEntries(), t3lib_BEfunc::getTCEFORM_TSconfig(), GParrayMerged(), t3lib_extobjbase::incLocalLang(), language::includeLLFile(), linkThisUrl(), tx_belog_webinfo::localLang(), tx_rtehtmlarea_user::main_user(), tslib_fe::mergingWithGetVars(), tslib_pibase::pi_linkTP_keepPIvars(), tslib_pibase::pi_setPiVarDefaults(), t3lib_TCEmain::process_cmdmap(), t3lib_BEfunc::RTEsetup(), and language::sL().

t3lib_div::arrayToLogString arr,
valueList = array(),
valueLength = 20
 

Converts a one dimensional array to a one line string which can be used for logging or debugging output Example: "loginType: FE; refInfo: Array; HTTP_HOST: www.example.org; REMOTE_ADDR: 192.168.1.5; REMOTE_HOST:; security_level:; showHiddenRecords: 0;"

Parameters:
array Data array which should be outputted
mixed List of keys which should be listed in the output string. Pass a comma list or an array. An empty list outputs the whole array.
integer Long string values are shortened to this length. Default: 20
Returns:
string Output string with key names and their value as string

Definition at line 4396 of file class.t3lib_div.php.

Referenced by t3lib_userAuth::checkAuthentication(), tslib_feUserAuth::fetchGroupData(), tx_sv_auth::getUser(), t3lib_modSettings::processStoreControl(), and t3lib_userAuth::start().

t3lib_div::breakLinesForEmail str,
implChar = "\n",
charWidth = 76
 

Breaks up a single line of text for emails Usage: 5

Parameters:
string The string to break up
string The string to implode the broken lines with (default/typically
)
integer The line length
Returns:
string
See also:
breakTextForEmail()

Definition at line 574 of file class.t3lib_div.php.

Referenced by user_plaintext::breakLines(), and breakTextForEmail().

t3lib_div::breakTextForEmail str,
implChar = "\n",
charWidth = 76
 

Breaks up the text for emails Usage: 1

Parameters:
string The string to break up
string The string to implode the broken lines with (default/typically
)
integer The line length
Returns:
string

Definition at line 555 of file class.t3lib_div.php.

References array_merge(), and breakLinesForEmail().

t3lib_div::calcParenthesis string  ) 
 

Calculates the input with parenthesis levels Usage: 2

Parameters:
string Input string, eg "(123 + 456) / 789 - 4"
Returns:
integer Calculated value. Or error string.
See also:
calcPriority(), tslib_cObj::stdWrap()

Definition at line 1258 of file class.t3lib_div.php.

References calcPriority().

Referenced by tslib_cObj::stdWrap().

t3lib_div::calcPriority string  ) 
 

Calculates the input by +,-,*,/,%,^ with priority to + and - Usage: 1

Parameters:
string Input string, eg "123 + 456 / 789 - 4"
Returns:
integer Calculated value. Or error string.
See also:
calcParenthesis()

Definition at line 1217 of file class.t3lib_div.php.

Referenced by calcParenthesis().

t3lib_div::callUserFunction funcName,
&$  params,
&$  ref,
checkPrefix = 'user_',
silent = 0
 

Calls a userdefined function/method in class Such a function/method should look like this: "function proc(&$params, &$ref) {...}" Usage: 17

Parameters:
string Function/Method reference, '[file-reference":"]["&"]class/function["->"method-name]'. You can prefix this reference with "[file-reference]:" and t3lib_div::getFileAbsFileName() will then be used to resolve the filename and subsequently include it by "require_once()" which means you don't have to worry about including the class file either! Example: "EXT:realurl/class.tx_realurl.php:&tx_realurl->encodeSpURL". Finally; you can prefix the class name with "&" if you want to reuse a former instance of the same object call ("singleton").
mixed Parameters to be pass along (typically an array) (REFERENCE!)
mixed Reference to be passed along (typically "$this" - being a reference to the calling object) (REFERENCE!)
string Required prefix of class or function name
boolean If set, no debug() error message is shown if class/function is not present.
Returns:
mixed Content from method/function call
See also:
getUserObj()

Definition at line 3756 of file class.t3lib_div.php.

References getFileAbsFileName(), isFirstPartOfStr(), makeInstance(), and revExplode().

Referenced by t3lib_userAuthGroup::calcPerms(), tslib_fe::checkAlternativeIdMethods(), t3lib_TCEmain::clear_cache(), tslib_fe::connectToDB(), tslib_fe::determineId(), t3lib_pageSelect::enableFields(), t3lib_tsfeBeUserAuth::extEditAction(), t3lib_TCEforms::formatValue(), t3lib_userAuthGroup::getPagePermsClause(), t3lib_BEfunc::getProcessedValue(), t3lib_fullsearch::getQueryResultCode(), t3lib_TCEforms::getSingleField_typeUser(), tslib_fe::headerNoCache(), t3lib_parsehtml::HTMLcleaner(), tslib_fe::initFEuser(), t3lib_userAuth::logoff(), tslib_fe::pageNotFoundHandler(), t3lib_TSparser::parseSub(), t3lib_transferData::procItems(), t3lib_TCEforms::procItems(), t3lib_TCEforms::renderWizards(), t3lib_fullsearch::resultRowDisplay(), tslib_gifBuilder::start(), t3lib_userAuth::start(), tslib_fe::tslib_fe(), and SC_mod_tools_em_index::tsStyleConfigForm().

t3lib_div::cHashParams addQueryParams  ) 
 

Splits the input query-parameters into an array with certain parameters filtered out. Used to create the cHash value

Parameters:
string Query-parameters: "&xxx=yyy&zzz=uuu"
Returns:
array Array with key/value pairs of query-parameters WITHOUT a certain list of variable names (like id, type, no_cache etc) and WITH a variable, encryptionKey, specific for this server/installation
See also:
tslib_fe::makeCacheHash(), tslib_cObj::typoLink()

Definition at line 3440 of file class.t3lib_div.php.

References inList().

Referenced by tslib_fe::cHashParams(), tslib_fe::makeCacheHash(), tx_indexedsearch_indexer::makeCHash(), and tslib_cObj::typoLink().

t3lib_div::clientInfo useragent = ''  ) 
 

Client Browser Information Usage: 4

Parameters:
string Alternative User Agent string (if empty, t3lib_div::getIndpEnv('HTTP_USER_AGENT') is used)
Returns:
array Parsed information about the HTTP_USER_AGENT in categories BROWSER, VERSION, SYSTEM and FORMSTYLE

Definition at line 3155 of file class.t3lib_div.php.

References getIndpEnv().

Referenced by tx_rtehtmlarea_parse_html::main(), t3lib_TCEforms::t3lib_TCEforms(), and tslib_fe::tslib_fe().

t3lib_div::cmpFQDN baseIP,
list
 

Match fully qualified domain name with list of strings with wildcard

Parameters:
string The current remote IP address for instance, typ. REMOTE_ADDR
string A comma-list of domain names to match with. *-wildcard allowed but cannot be part of a string, so it must match the full host name (eg. myhost.*.com => correct, myhost.*domain.com => wrong)
Returns:
boolean True if a domain name mask from $list matches $baseIP

Definition at line 805 of file class.t3lib_div.php.

References trimExplode().

Referenced by t3lib_matchCondition::evalConditionStr().

t3lib_div::cmpIP baseIP,
list
 

Match IP number with list of numbers with wildcard Dispatcher method for switching into specialised IPv4 and IPv6 methods. Usage: 10

Parameters:
string $baseIP is the current remote IP address for instance, typ. REMOTE_ADDR
string $list is a comma-list of IP-addresses to match with. *-wildcard allowed instead of number, plus leaving out parts in the IP number is accepted as wildcard (eg. 192.168.*.* equals 192.168). If list is "*" no check is done and the function returns TRUE immediately.
Returns:
boolean True if an IP-mask from $list matches $baseIP

Definition at line 610 of file class.t3lib_div.php.

References cmpIPv4(), cmpIPv6(), and validIPv6().

Referenced by t3lib_tsfeBeUserAuth::checkBackendAccessSettingsFromInitPhp(), t3lib_beUserAuth::checkLockToIP(), t3lib_matchCondition::evalConditionStr(), and tx_sv_auth::getGroups().

t3lib_div::cmpIPv4 baseIP,
list
 

Match IPv4 number with list of numbers with wildcard

Parameters:
string $baseIP is the current remote IP address for instance, typ. REMOTE_ADDR
string $list is a comma-list of IP-addresses to match with. *-wildcard allowed instead of number, plus leaving out parts in the IP number is accepted as wildcard (eg. 192.168.*.* equals 192.168)
Returns:
boolean True if an IP-mask from $list matches $baseIP

Definition at line 626 of file class.t3lib_div.php.

References trimExplode().

Referenced by cmpIP().

t3lib_div::cmpIPv6 baseIP,
list
 

Match IPv6 address with a list of IPv6 prefixes

Parameters:
string $baseIP is the current remote IP address for instance
string $list is a comma-list of IPv6 prefixes, could also contain IPv4 addresses
Returns:
boolean True if an baseIP matches any prefix

Definition at line 668 of file class.t3lib_div.php.

References IPv6Hex2Bin(), normalizeIPv6(), trimExplode(), and validIPv6().

Referenced by cmpIP().

t3lib_div::compat_version verNumberStr  ) 
 

Returns true if the current TYPO3 version (or compatibility version) is compatible to the input version

Parameters:
string Minimum version number required (format x.y.z)
Returns:
boolean true or false

Definition at line 934 of file class.t3lib_div.php.

References int_from_ver().

Referenced by t3lib_BEfunc::displayWarningMessages(), t3lib_matchCondition::evalConditionStr(), and tslib_fe::getConfigArray().

t3lib_div::compileSelectedGetVarsFromArray varList,
getArray,
GPvarAlt = 1
 

Returns an array with selected keys from incoming data. (Better read source code if you want to find out...) Usage: 3

Parameters:
string List of variable/key names
array Array from where to get values based on the keys in $varList
boolean If set, then t3lib_div::_GP() is used to fetch the value if not found (isset) in the $getArray
Returns:
array Output array with selected variables.

Definition at line 1564 of file class.t3lib_div.php.

Referenced by SC_alt_doc::compileStoreDat(), and template::makeShortcutUrl().

t3lib_div::convertMicrotime microtime  ) 
 

Returns microtime input to milliseconds Usage: 2

Parameters:
string Microtime
Returns:
integer Microtime input string converted to an integer (milliseconds)

Definition at line 1181 of file class.t3lib_div.php.

t3lib_div::convUmlauts str  ) 
 

Change umlaut characters to plain ASCII with normally two character target Only known characters will be converted, so don't expect a result for any character. (DEPRECATED: Works only for western europe single-byte charsets! Use t3lib_cs::specCharsToASCII() instead!)

ä => ae, Ö => Oe

Parameters:
string String to convert.
Returns:
string

Definition at line 1105 of file class.t3lib_div.php.

t3lib_div::csvValues row,
delim = ',',
quote = '"'
 

Takes a row and returns a CSV string of the values with $delim (default is ,) and $quote (default is ") as separator chars. Usage: 5

Parameters:
array Input array of values
string Delimited, defau