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='"')
 removeDotsFromTS ($ts)
 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, $requestHeaders=false)
 writeFile ($file, $content)
 fixPermissions ($file)
 writeFileToTypo3tempDir ($filepath, $content)
 mkdir ($theNewFolder)
 mkdir_deep ($destination, $deepDir)
 get_dirs ($path)
 getFilesInDir ($path, $extensionList='', $prependPath=0, $order='', $excludePattern='')
 getAllFilesAndFoldersInPath ($fileArr, $path, $extList='', $regDirs=0, $recursivityLevels=99, $excludePattern='')
 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='')
 getHostname ($requestHost=TRUE)
 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())
 requireOnce ($requireFile)
 plainMailEncoded ($email, $subject, $message, $headers='', $encoding='quoted-printable', $charset='', $dontEncodeHeader=false)
 quoted_printable ($string, $maxlen=76)
 encodeHeader ($line, $enc='quoted-printable', $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::getIndpEnv ( getEnvName  ) 

Abstraction method which returns System Environment Variables regardless of server OS, CGI/MODULE version etc. Basically this is SERVER variables for most of them. This should be used instead of getEnv() and HTTP_SERVER_VARS/ENV_VARS to get reliable values for all situations.

Usage: 226

Parameters:
string Name of the "environment variable"/"server variable" you wish to use. Valid values are SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI, PATH_INFO, REMOTE_ADDR, REMOTE_HOST, HTTP_REFERER, HTTP_HOST, HTTP_USER_AGENT, HTTP_ACCEPT_LANGUAGE, QUERY_STRING, TYPO3_DOCUMENT_ROOT, TYPO3_HOST_ONLY, TYPO3_HOST_ONLY, TYPO3_REQUEST_HOST, TYPO3_REQUEST_URL, TYPO3_REQUEST_SCRIPT, TYPO3_REQUEST_DIR, TYPO3_SITE_URL, _ARRAY
Returns:
string Value based on the input key, independent of server/os environment.

Definition at line 46 of file incfile.php.

References dirname(), and trimExplode().

Referenced by tslib_fe::ADMCMD_preview(), alt_menu_functions::adminFunctions(), tslib_fe::beLoginLinkIPList(), tslib_fe::checkAlternativeIdMethods(), t3lib_userAuth::checkAuthentication(), t3lib_tsfeBeUserAuth::checkBackendAccessSettingsFromInitPhp(), tslib_fe::checkDataSubmission(), tslib_fe::checkJumpUrlReferer(), t3lib_beUserAuth::checkLockToIP(), tx_install::checkPassword(), SC_mod_tools_log_index::checkUpload(), template::clearCacheMenu(), clientInfo(), clickMenu::DB_db_list(), tx_rtehtmlarea_pi2::drawRTE(), tx_rtehtmlarea_base::drawRTE(), tslib_cObj::editIcons(), t3lib_BEfunc::editOnClick(), tslib_cObj::editPanelLinkWrap(), tslib_cObj::editPanelLinkWrap_doWrap(), t3lib_beUserAuth::emailAtLogin(), t3lib_matchCondition::evalConditionStr(), t3lib_userAuthGroup::fetchGroups(), browse_links::fileList(), tslib_fe::findDomainRecord(), SC_alt_main::generateJScode(), wsol_preview::generateUrls(), t3lib_userAuth::getAuthInfoArray(), tslib_fe::getConfigArray(), tslib_cObj::getData(), t3lib_matchCondition::getGP_ENV_TSFE(), getIndpEnv(), t3lib_BEfunc::getPathType_web_nonweb(), tslib_cObj::getQueryArguments(), tx_cms_layout::getTable_tt_content(), getThisUrl(), t3lib_parsehtml::HTMLcleaner(), SC_mod_tools_log_index::importData(), SC_wizard_table::init(), SC_wizard_forms::init(), tx_rtehtmlarea_user::init(), tx_rtehtmlarea_select_image::init(), tx_rtehtmlarea_dam_browse_media::init(), tx_rtehtmlarea_browse_links::init(), user_feAdmin::init(), browse_links::init(), t3lib_basicFileFunctions::init(), SC_index::init(), t3lib_userAuth::ipLockClause_remoteIPNumber(), template::issueCommand(), tx_cms_layout::languageSelector(), tx_indexedsearch::linkPage(), linkThisScript(), fileList::linkWrapFile(), localFolderTree::localFolderTree(), locationHeaderUrl(), SC_wizard_list::main(), SC_wizard_add::main(), SC_tce_file::main(), SC_tce_db::main(), SC_logomenu::main(), SC_db_list::main(), SC_mod_web_view_index::main(), tx_version_cm1::main(), t3lib_queryGenerator::makeOptionList(), localRecordList::makeReturnUrl(), template::makeShortcutIcon(), t3lib_fullsearch::makeValueList(), tx_cms_layout::newContentElementOnClick(), t3lib_TCEmain::notifyStageChange(), t3lib_positionMap::onClickInsertRecord(), TSpagegen::pagegenInit(), tslib_fe::pageNotFoundHandler(), template::parseTime(), tx_install::phpinformation(), tslib_pibase::pi_getEditIcon(), tslib_fe::prefixLocalAnchorsWithScript(), SC_alt_doc::preInit(), tslib_fe::printError(), SC_mod_user_ws_workspaceForms::processData(), SC_alt_doc::processData(), SC_db_new::regularNew(), TSpagegen::renderContentWithHeader(), tx_rtehtmlarea_dam_browse_media::renderFileList(), SC_db_layout::renderQuickEdit(), mod_user_task::sendEmail(), SC_alt_doc::setDocument(), tslib_fe::setIDfromArgV(), t3lib_parsehtml_proc::siteUrl(), t3lib_userAuth::start(), t3lib_formmail::start(), tslib_fe::statistics(), TBE_browser_recordList::TBE_browser_recordList(), tslib_fe::tempPageCacheContent(), t3lib_beUserAuth::trackBeUser(), t3lib_parsehtml_proc::TS_images_db(), t3lib_parsehtml_proc::TS_images_rte(), tx_cms_layout::tt_content_drawHeader(), t3lib_BEfunc::viewOnClick(), template::viewPageIcon(), tx_version_cm1::workspaceMgm(), t3lib_userAuthGroup::writelog(), and tx_indexedsearch::writeSearchStat().

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(), t3lib_extobjbase::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(), tx_version_cm1::displayWorkspaceOverview_allStageCmd(), tslib_cObj::editIcons(), tslib_cObj::editPanel(), tslib_cObj::editPanelLinkWrap(), tx_rtehtmlarea_select_image::expandFolder(), localPageTree::ext_tree(), SC_mod_tools_em_index::extensionList_import(), 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(), tslib_feUserAuth::getLoginFormData(), t3lib_userAuth::getLoginFormData(), SC_mod_user_ws_workspaceForms::getModuleParameters(), t3lib_fullsearch::getQueryResultCode(), t3lib_TCEforms::getSingleField_typeFlex(), t3lib_extobjbase::handleExternalFunctionValue(), tx_rtehtmlarea_dam_browse_media::imageInsert(), 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(), tx_rtehtmlarea_user::init(), tx_rtehtmlarea_select_image::init(), tx_rtehtmlarea_dam_browse_media::init(), tx_rtehtmlarea_browse_links::init(), tx_rtehtmlarea_acronym::init(), user_feAdmin::init(), SC_db_new_content_el::init(), SC_db_layout::init(), SC_move_el::init(), SC_mod_user_ws_publish::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(), SC_browse_links::init(), SC_alt_palette::init(), SC_alt_menu::init(), SC_alt_file_navframe::init(), SC_alt_doc_ajax::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(), tx_rtehtmlarea_dam_browse_media::isValid(), tslib_fe::jumpUrl(), 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_SC_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(), tx_rtehtmlarea_SC_browse_links::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_parse_html::main_parse_html(), tx_rtehtmlarea_select_image::main_rte(), tx_rtehtmlarea_dam_browse_media::main_rte(), 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(), TSpagegen::pagegenInit(), user_feAdmin::parseValues(), SC_alt_shortcut::preinit(), SC_alt_doc::preInit(), tx_dbal_module1::printCachedInfo(), tx_dbal_module1::printLogMgm(), tx_dbal_module1::printSqlCheck(), webPageTree::printTree(), filelistFolderTree::printTree(), 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(), tslib_fe::statistics(), SC_mod_user_setup_index::storeIncomingData(), SC_mod_tools_be_user_index::switchUser(), 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::_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(), t3lib_BEfunc::getFuncMenu(), tslib_cObj::getQueryArguments(), SC_show_item::init(), linkThisScript(), tx_tstemplateobjbrowser::main(), tx_tstemplateanalyzer::main(), SC_logomenu::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(), TSpagegen::pagegenInit(), SC_alt_doc::preInit(), t3lib_TStemplate::processTemplate(), SC_db_layout::renderQuickEdit(), t3lib_userAuth::start(), SC_alt_main::startModule(), and SC_mod_tools_em_index::translationHandling().

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(), tslib_fe::fe_tce(), tslib_cObj::FORM(), tslib_feUserAuth::getLoginFormData(), 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(), tx_lowlevel_cleaner::quickDBlookUp(), SC_mod_tools_em_index::requestInstallExtensions(), tslib_cObj::SEARCHRESULT(), tslib_fe::sendFormmail(), 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::_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(), and tslib_fe::mergingWithGetVars().

t3lib_div::GPvar ( var,
strip = 0 
)

GET/POST variable Returns the 'GLOBAL' value of incoming data from POST or GET, with priority to POST (that is equalent to 'GP' order) Strips slashes of string-outputs, but not arrays UNLESS $strip is set. If $strip is set all output will have escaped characters unescaped. Usage: 2

Parameters:
string GET/POST var to return
boolean If set, values are stripped of return values that are *arrays!* - string/integer values returned are always strip-slashed()
Returns:
mixed POST var named $var and if not set, the GET var of the same name.
Deprecated:
Use t3lib_div::_GP instead (ALWAYS delivers a value with un-escaped values!)
See also:
_GP()

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

References stripSlashesOnArray().

t3lib_div::GParrayMerged ( var  ) 

Returns the GET/POST global arrays merged with POST taking precedence. Usage: 1

Parameters:
string Key (variable name) from GET or POST vars
Returns:
array Returns the GET vars merged recursively onto the POST vars.
Deprecated:

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

References array_merge_recursive_overrule(), and stripSlashesOnArray().

Referenced by tslib_pibase::tslib_pibase().

t3lib_div::gif_compress ( theFile,
type 
)

Compressing a GIF file if not already LZW compressed This function is a workaround for the fact that ImageMagick and/or GD does not compress GIF-files to their minimun size (that is RLE or no compression used)

The function takes a file-reference, $theFile, and saves it again through GD or ImageMagick in order to compress the file GIF: If $type is not set, the compression is done with ImageMagick (provided that $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw'] is pointing to the path of a lzw-enabled version of 'convert') else with GD (should be RLE-enabled!) If $type is set to either 'IM' or 'GD' the compression is done with ImageMagick and GD respectively PNG: No changes.

$theFile is expected to be a valid GIF-file! The function returns a code for the operation. Usage: 9

Parameters:
string Filepath
string See description of function
Returns:
string Returns "GD" if GD was used, otherwise "IM" if ImageMagick was used. If nothing done at all, it returns empty string.

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

References imageMagickCommand().

Referenced by t3lib_stdGraphic::imageMagickConvert(), t3lib_iconWorks::makeIcon(), and t3lib_stdGraphic::output().

t3lib_div::png_to_gif_by_imagemagick ( theFile  ) 

Converts a png file to gif This converts a png file to gif IF the FLAG $GLOBALS['TYPO3_CONF_VARS']['FE']['png_to_gif'] is set true. Usage: 5

Parameters:
string $theFile the filename with path
Returns:
string new filename

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

References imageMagickCommand().

Referenced by tslib_cObj::cImage(), tslib_tmenu::getBeforeAfter(), and tslib_imgmenu::makeImageMap().

t3lib_div::read_png_gif ( theFile,
output_png = 0 
)

Returns filename of the png/gif version of the input file (which can be png or gif). If input file type does not match the wanted output type a conversion is made and temp-filename returned. Usage: 2

Parameters:
string Filepath of image file
boolean If set, then input file is converted to PNG, otherwise to GIF
Returns:
string If the new image file exists, it's filepath is returned

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

Referenced by t3lib_iconWorks::imagecreatefrom().

t3lib_div::fixed_lgd ( string,
origChars,
preStr = '...' 
)

Truncate string Returns a new string of max. $chars length. If the string is longer, it will be truncated and appended with '...'. Usage: 39

Parameters:
string string to truncate
integer must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end.
string String to append to the output if it is truncated, default is '...'
Returns:
string new string
Deprecated:
Works ONLY for single-byte charsets! USE t3lib_div::fixed_lgd_cs() instead
See also:
fixed_lgd_pre()

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

Referenced by user_wapversion::cBodytext(), user_wapversion::contentAbstract(), tx_indexedsearch_modfunc1::drawTableOfIndexedPages(), tslib_cObj::editPanel(), tx_rtehtmlarea_select_image::expandFolder(), SC_mod_tools_em_index::extensionListRow(), SC_mod_tools_em_index::extensionTitleIconHeader(), t3lib_timeTrack::fixCLen(), mod_user_task::fixed_lgd(), fixed_lgd_cs(), fixed_lgd_pre(), fileList::formatDirList(), fileList::formatFileList(), tx_install::generateConfigForm(), SC_mod_tools_isearch_index::getPhashExternalDocs(), SC_mod_tools_isearch_index::getPhashT3pages(), SC_alt_shortcut::main(), SC_mod_web_perm_index::notEdit(), and tx_rtehtmlarea_image_folderTree::printTree().

t3lib_div::fixed_lgd_pre ( string,
chars 
)

Truncate string Returns a new string of max. $chars length. If the string is longer, it will be truncated and prepended with '...'. This works like fixed_lgd, but is truncated in the start of the string instead of the end Usage: 6

Parameters:
string string to truncate
integer must be an integer of at least 4
Returns:
string new string
Deprecated:
Use either fixed_lgd() or fixed_lgd_cs() (with negative input value for $chars)
See also:
fixed_lgd()

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

References fixed_lgd().

Referenced by t3lib_timeTrack::printTSlog().

t3lib_div::fixed_lgd_cs ( string,
chars 
)

Truncates a string with appended/prepended "..." and takes backend character set into consideration Use only from backend! Usage: 75

Parameters:
string string to truncate
integer must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end.
Returns:
string New string
See also:
fixed_lgd()

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

References fixed_lgd().

Referenced by t3lib_diff::addClearBuffer(), t3lib_clipboard::confirmMsg(), tx_cms_layout::dataFields(), SC_mod_user_ws_index::displayWorkspaceOverview_pageTreeIconTitle(), browse_links::expandFolder(), browse_links::expandPage(), tx_impexp::export_addRecord(), browse_links::fileList(), t3lib_admin::genTree(), template::getFileheader(), template::getHeader(), t3lib_BEfunc::getProcessedValue(), t3lib_BEfunc::getRecordTitlePrep(), t3lib_TCEforms::getSingleField_typeFlex_draw(), tx_cms_layout::getTable_tt_content(), t3lib_treeView::getTitleStr(), t3lib_browseTree::getTitleStr(), recordList::linkWrapItems(), TBE_browser_recordList::linkWrapItems(), tx_wizardsortpages_webfunc_2::main(), tx_wizardcrpages_webfunc_2::main(), tx_impexp_modfunc1::main(), SC_logomenu::main(), SC_alt_shortcut::main(), SC_alt_db_navframe::main(), SC_mod_web_ts_index::main(), SC_mod_web_perm_index::main(), SC_mod_web_info_index::main(), SC_mod_web_func_index::main(), SC_mod_web_perm_index::notEdit(), tx_impexp_modfunc1::overview_main(), browse_links::parseCurUrl(), t3lib_positionMap::positionTree(), t3lib_clipboard::printContentFromTab(), clickMenu::printDBClickMenu(), tx_indexedsearch_modfunc1::printPhashRow(), tx_rtehtmlarea_folderTree::printTree(), localFolderTree::printTree(), printAllPageTree_perms::printTree(), t3lib_loadDBGroup::readyForInterface(), tx_rtehtmlarea_dam_browse_media::renderFileList(), tx_cms_webinfo_lang::renderL10nTable(), SC_mod_web_ts_index::renderList(), SC_db_layout::renderListContent(), SC_db_layout::renderQuickEdit(), tx_cms_layout::renderText(), t3lib_TCEforms::replaceTableWrap(), t3lib_transferData::selectAddForeign(), tx_impexp::singleRecordLines(), browse_links::TBE_dragNDrop(), tx_cms_layout::tt_board_drawItem(), fileList::writeTop(), and localRecordList::writeTop().

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
Deprecated:
Use PHP function wordwrap()
Returns:
string

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

References breakLinesForEmail().

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 575 of file class.t3lib_div.php.

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

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 611 of file class.t3lib_div.php.

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

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

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 627 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 669 of file class.t3lib_div.php.

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

Referenced by cmpIP().

t3lib_div::IPv6Hex2Bin ( hex  ) 

[Describe function...]

Parameters:
[type] $hex: ...
Returns:
[type] ...

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

Referenced by cmpIPv6().

t3lib_div::normalizeIPv6 ( address  ) 

Normalize an IPv6 address to full length

Parameters:
string Given IPv6 address
Returns:
string Normalized address

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

Referenced by cmpIPv6().

t3lib_div::validIPv6 ( ip  ) 

Validate a given IP address to the IPv6 address format.

Example for possible format: 43FBBB3F:A0A0:0 | ::1

Parameters:
string IP address to be tested
Returns:
boolean True if $ip is of IPv6 format.

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

Referenced by cmpIP(), and cmpIPv6().

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 806 of file class.t3lib_div.php.

References trimExplode().

Referenced by t3lib_matchCondition::evalConditionStr().

t3lib_div::inList ( list,
item 
)

Check for item in list Check if an item exists in a comma-separated list of items. Usage: 163

Parameters:
string comma-separated list of items (string)
string item to check for
Returns:
boolean true if $item is in $list

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

Referenced by tslib_cObj::_parseFunc(), ux_t3lib_DB::_quoteWhereClause(), t3lib_treeView::addField(), t3lib_TCEforms::addSelectOptionsToItemArray(), t3lib_extMgm::addToAllTCAtypes(), t3lib_BEfunc::blindUserNames(), tx_rtehtmlarea_base::buildJSFontfacesConfig(), cHashParams(), tslib_cObj::checkIf(), t3lib_TCEmain::checkModifyAccessList(), t3lib_loadModules::checkModWorkspace(), t3lib_TCEmain::checkValue(), t3lib_userAuthGroup::checkWorkspace(), t3lib_cli::cli_keyboardInput_yes(), tx_lowlevel_cleaner_core::cli_referenceIndexCheck(), t3lib_sqlparser::compileWhereClause(), t3lib_htmlmail::constructHTML_media(), t3lib_stdGraphic::copyImageOntoImage(), t3lib_TCEmain::copyPages(), t3lib_TCEmain::copyRecord(), tx_version_cm1::createDiffView(), SC_mod_user_ws_index::createDiffView(), t3lib_fullsearch::csvRowTitles(), tslib_cObj::DBgetInsert(), tslib_cObj::DBgetUpdate(), tslib_cObj::DBmayFEUserEdit(), ux_t3lib_DB::debugHandler(), clickMenu::enableDisableItems(), t3lib_matchCondition::evalConditionStr(), user_feAdmin::evalValues(), browse_links::expandPage(), tx_impexp::export_addFile(), t3lib_tsparser_ext::ext_getObjTree(), t3lib_tsparser_ext::ext_procesInput(), SC_mod_tools_em_index::extDelete(), SC_mod_tools_em_index::extensionListRow(), SC_mod_tools_em_index::extInformationArray(), tslib_cObj::filelink(), tslib_cObj::filelist(), browse_links::fileList(), tslib_cObj::fileResource(), tslib_menu::filterMenuPages(), t3lib_TCEforms::foreignTable(), tslib_cObj::FORM(), t3lib_extFileFunctions::func_edit(), SC_mod_tools_dbint_index::func_filesearch(), t3lib_extFileFunctions::func_newfile(), SC_mod_tools_dbint_index::func_records(), recordList::generateList(), t3lib_refindex::generateRefIndexData(), tslib_cObj::getBorderAttr(), t3lib_install::getDatabaseExtra(), t3lib_TCEmain::getExcludeListArray(), SC_mod_tools_em_index::getFileListOfExtension(), SC_wizard_forms::getFormHTML(), t3lib_stdGraphic::getImageDimensions(), tslib_cObj::getImgResource(), t3lib_BEfunc::getModuleData(), t3lib_TCEforms_inline::getPossibleRecords(), t3lib_BEfunc::getProcessedValue(), t3lib_BEfunc::getRecordWSOL(), tslib_gifBuilder::getResource(), t3lib_TCEforms::getSingleField(), t3lib_TCEforms::getSingleField_typeFlex_draw(), t3lib_TCEforms::getSingleField_typeSelect(), tx_sv_auth::getSubGroups(), localRecordList::getTable(), tx_cms_layout::getTableMenu(), t3lib_softrefproc::getTypoLinkParts(), t3lib_userAuth::hashLockClause_getHashInt(), tslib_cObj::HMENU(), tslib_cObj::imageLinkWrap(), t3lib_stdGraphic::imageMagickConvert(), SC_mod_tools_log_index::importData(), tx_impexp::includeSoftref(), t3lib_TStemplate::includeStaticTypoScriptSources(), tx_indexedsearch::initialize(), SC_mod_user_ws_workspaceForms::initTCEForms(), t3lib_basicFileFunctions::is_allowed(), t3lib_TCEforms::isDisplayCondition(), fileList::isImage(), tslib_menu::isSubMenu(), SC_db_new::isTableAllowedForThisPage(), recordList::linkUrlMail(), recordList::listURL(), TBE_browser_recordList::listURL(), t3lib_TCEmain::localize(), tx_wizardsortpages_webfunc_2::main(), tx_tstemplateinfo::main(), tx_rtehtmlarea_pi1::main(), SC_mod_tools_em_index::main(), SC_file_edit::main(), SC_alt_doc::main(), SC_mod_tools_log_index::main(), tslib_menu::makeMenu(), t3lib_queryGenerator::makeOptionList(), t3lib_fullsearch::makeValueList(), t3lib_stdGraphic::maskImageOntoImage(), SC_db_layout::menuConfig(), t3lib_SCbase::mergeExternalItems(), t3lib_userAuthGroup::modAccess(), tslib_cObj::MULTIMEDIA(), tslib_pibase::pi_list_query(), t3lib_clipboard::printContentFromTab(), clickMenu::printFileClickMenu(), tx_tstemplateinfo::procesResources(), tslib_cObj::processParams(), t3lib_TStemplate::processTemplate(), fileList::readDirectory(), transferData::regItem(), user_feAdmin::removeRequired(), tx_rtehtmlarea_dam_browse_media::renderFileList(), tx_tstemplateinfo::resourceListForCopy(), t3lib_fullsearch::resultRowDisplay(), t3lib_fullsearch::resultRowTitles(), tx_rtehtmlarea_base::setToolBar(), SC_mod_tools_em_index::showExtDetails(), tx_impexp::singleRecordLines(), t3lib_stdGraphic::splitString(), t3lib_formmail::start(), tslib_fe::statistics(), tslib_menu::subMenu(), SC_mod_tools_log_index::tableSelector(), browse_links::TBE_dragNDrop(), t3lib_BEfunc::thumbCode(), t3lib_parsehtml_proc::TS_images_db(), t3lib_parsehtml_proc::TS_links_rte(), t3lib_parsehtml_proc::TS_transform_rte(), tslib_cObj::typoLink(), t3lib_tsparser_ext::upload_copy_file(), tx_indexedsearch_lexer::utf8_is_letter(), t3lib_TCEmain::version_setStage(), and tx_version_cm1::versioningMgm().

t3lib_div::rmFromList ( element,
list 
)

Removes an item from a comma-separated list of items. Usage: 1

Parameters:
string element to remove
string comma-separated list of items (string)
Returns:
string new comma-separated list of items

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

Referenced by fileList::getTable().

t3lib_div::expandList ( list  ) 

Expand a comma-separated list of integers with ranges (eg 1,3-5,7 becomes 1,3,4,5,7). Ranges are limited to 1000 values per range.

Parameters:
string comma-separated list of integers with ranges (string)
Returns:
string new comma-separated list of items
Author:
Martin Kutschker <martin.kutschker@activesolution.at>

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

t3lib_div::intInRange ( theInt,
min,
max = 2000000000,
zeroValue = 0 
)

Forces the integer $theInt into the boundaries of $min and $max. If the $theInt is 'false' then the $zeroValue is applied. Usage: 224

Parameters:
integer Input value
integer Lower limit
integer Higher limit
integer Default value if input is false.
Returns:
integer The input value forced into the boundaries of $min and $max

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

Referenced by SC_mod_tools_log_index::addRecordsForPid(), t3lib_TCEforms::addSelectOptionsToItemArray(), tx_indexedsearch_indexer::bodyDescription(), user_plaintext::breakBulletlist(), tx_lowlevel_cleaner_core::cli_printInfo(), tslib_cObj::COLUMNS(), t3lib_stdGraphic::convertColor(), t3lib_stdGraphic::copyGifOntoGif(), tx_indexedsearch_crawler::crawler_execute_type1(), t3lib_TCEforms::dbFileIcons(), tslib_cObj::editPanelPreviewBorder(), SC_mod_tools_log_index::exportData(), t3lib_tsparser_ext::ext_procesInput(), tslib_tmenu_layers::extProc_beforeLinking(), tslib_gmenu_layers::extProc_beforeLinking(), tslib_gmenu_foldout::extProc_finish(), tx_indexed_search_extparse::fileContentParts(), tslib_cObj::FORM(), t3lib_TCEforms::formatValue(), t3lib_TStemplate::generateConfig(), tx_indexedsearch_crawler::generateNextIndexingTime(), tx_lowlevel_cleaner_core::genTree_traverse(), tslib_fe::getConfigArray(), tx_indexedsearch::getDisplayResults(), t3lib_TCEforms::getExcludeElements(), tslib_cObj::getImgResource(), tslib_cObj::getQuery(), tx_indexedsearch::getResultRows(), t3lib_TCEforms::getSingleField_typeGroup(), t3lib_TCEforms_inline::getSingleField_typeInline(), t3lib_TCEforms::getSingleField_typeInput(), t3lib_TCEforms::getSingleField_typeNone_render(), t3lib_TCEforms::getSingleField_typeSelect_multiple(), t3lib_TCEforms::getSingleField_typeSelect_singlebox(), t3lib_TCEforms::getSingleField_typeText(), t3lib_stdGraphic::getTextScalFactor(), tslib_cObj::HRULER(), t3lib_parsehtml::HTMLcleaner(), t3lib_stdGraphic::imagecopyresized(), tx_rtehtmlarea_dam_browse_media::imageInsert(), tslib_cObj::IMGTEXT(), t3lib_stdGraphic::IMparams(), t3lib_stdGraphic::IMreduceColors(), SC_wizard_table::init(), SC_tce_db::init(), tx_indexedsearch_indexer::init(), SC_file_upload::init(), SC_alt_clickmenu::init(), t3lib_stdGraphic::init(), tx_indexedsearch::initialize(), t3lib_clipboard::initializeClipboard(), SC_alt_db_navframe::initializeTemporaryDBmount(), tx_indexed_search_extparse::initParser(), t3lib_stdGraphic::inputLevels(), t3lib_userAuth::ipLockClause_remoteIPNumber(), tx_rtehtmlarea_select_image::magicProcess(), tx_lowlevel_versions::main(), tx_lowlevel_deleted::main(), tx_lowlevel_cleanflexform::main(), SC_file_upload::main(), SC_file_newfolder::main(), SC_file_list::main(), SC_db_list::main(), SC_alt_mod_frameset::main(), user_wapversion::main_wapversion(), t3lib_stdGraphic::makeBox(), tslib_menu::makeMenu(), t3lib_stdGraphic::makeOutline(), tx_indexedsearch::makeRating(), t3lib_stdGraphic::makeShadow(), t3lib_stdGraphic::makeText(), tx_indexedsearch::markupSWpartsOfString(), modifyHTMLColor(), t3lib_TCEforms::optionTagStyle(), t3lib_stdGraphic::output(), t3lib_stdGraphic::outputLevels(), user_plaintext::pad(), TSpagegen::pagegenInit(), user_feAdmin::parseValues(), tslib_pibase::pi_getPidList(), tx_indexedsearch::pi_list_browseresults(), tslib_pibase::pi_list_browseresults(), tslib_pibase::pi_list_query(), t3lib_positionMap::printRecordMap(), t3lib_TCEmain::process_cmdmap(), t3lib_TCEmain::process_datamap(), t3lib_sqlengine::processAccordingToConfig(), tx_cssstyledcontent_pi1::render_table(), tx_cssstyledcontent_pi1::render_textpic(), tx_sysaction::renderActions(), user_plaintext::renderHeader(), SC_db_layout::renderListContent(), t3lib_TCEforms_inline::renderPossibleRecordsSelectorTypeSelect(), SC_mod_tools_em_index::renderVersion(), t3lib_TCEforms::renderWizards(), tslib_cObj::SEARCHRESULT(), t3lib_TCEmain::setHistory(), tslib_gifBuilder::start(), recordList::start(), t3lib_userAuth::start(), t3lib_formmail::start(), SC_mod_user_setup_index::storeIncomingData(), t3lib_parsehtml_proc::TS_transform_rte(), t3lib_stdGraphic::v5_blur(), t3lib_stdGraphic::v5_sharpen(), t3lib_userAuthGroup::workspaceVersioningTypeAccess(), and t3lib_userAuthGroup::workspaceVersioningTypeGetClosest().

t3lib_div::intval_positive ( theInt  ) 

Returns the $integer if greater than zero, otherwise returns zero. Usage: 1

Parameters:
integer Integer string to process
Returns:
integer

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

Referenced by user_feAdmin::evalValues().

t3lib_div::int_from_ver ( verNumberStr  ) 

Returns an integer from a three part version number, eg '4.12.3' -> 4012003 Usage: 2

Parameters:
string Version number on format x.x.x
Returns:
integer Integer version of version number (where each part can count to 999)

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

Referenced by tx_coreupdates_compatversion::checkUserInput(), compat_version(), tx_rtehtmlarea_pi2::drawRTE(), tx_rtehtmlarea_base::drawRTE(), tx_rtehtmlarea_base::isAvailable(), and tx_coreupdates_compatversion::showChangesNeeded().

t3lib_div::compat_version ( verNumberStr  ) 

Returns true if the current TYPO3 version (or compatibility version) is compatible to the input version Notice that this function compares branches, not versions (4.0.1 would be > 4.0.0 although they use the same compat_version)

Parameters:
string Minimum branch number required (format x.y / e.g. "4.0" NOT "4.0.0"!)
Returns:
boolean Returns true if this setup is compatible with the provided version number
Todo:
Still needs a function to convert versions to branches

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

References int_from_ver().

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

t3lib_div::md5int ( str  ) 

Makes a positive integer hash out of the first 7 chars from the md5 hash of the input Usage: 5

Parameters:
string String to md5-hash
Returns:
integer Returns 28bit integer-hash

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

Referenced by tx_indexedsearch_crawler::crawler_init(), filelistFolderTree::getBrowsableTree(), t3lib_TStemplate::getCurrentPageData(), filelistFolderTree::getFolderTree(), t3lib_userAuth::hashLockClause_getHashInt(), t3lib_TStemplate::start(), t3lib_refindex::submitWords(), and t3lib_refindex::updateWordIndex().

t3lib_div::shortMD5 ( input,
len = 10 
)

Returns the first 10 positions of the MD5-hash (changed from 6 to 10 recently)

Usage: 37

Parameters:
string Input string to be md5-hashed
integer The string-length of the output
Returns:
string Substring of the resulting md5-hash, being $len chars long (from beginning)

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

Referenced by tx_indexedsearch_indexer::extractHyperLinks(), tslib_gifBuilder::fileName(), tx_rtehtmlarea_dam_browse_media::getFileListArr(), tslib_cObj::getImgResource(), t3lib_stdGraphic::imageMagickConvert(), SC_alt_clickmenu::init(), tslib_fe::jumpUrl(), tslib_fe::makeCacheHash(), tx_indexedsearch_indexer::makeCHash(), t3lib_modSettings::processStoreControl(), t3lib_parsehtml_proc::TS_images_db(), t3lib_extMgm::typo3_loadExtensions(), and template::wrapClickMenuOnIcon().

t3lib_div::uniqueList ( in_list,
secondParameter = NULL 
)

Takes comma-separated lists and arrays and removes all duplicates If a value in the list is trim(empty), the value is ignored. Usage: 16

Parameters:
string Accept multiple parameters wich can be comma-separated lists of values and arrays.
mixed $secondParameter: Dummy field, which if set will show a warning!
Returns:
string Returns the list without any duplicates of values, space around values are trimmed

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

References trimExplode().

Referenced by t3lib_userAuthGroup::fetchGroupData(), tslib_cObj::filelist(), t3lib_BEfunc::getRecordWSOL(), fileList::getTable(), and t3lib_basicFileFunctions::init().

t3lib_div::split_fileref ( fileref  ) 

Splits a reference to a file in 5 parts Usage: 43

Parameters:
string Filename/filepath to be analysed
Returns:
array Contains keys [path], [file], [filebody], [fileext], [realFileext]

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

Referenced by tx_impexp::addFiles(), tslib_fe::checkAlternativeIdMethods(), t3lib_TCEmain::checkValue_group_select_file(), tslib_cObj::filelink(), tslib_cObj::filelist(), tslib_cObj::fileResource(), t3lib_extFileFunctions::findRecycler(), t3lib_extFileFunctions::func_copy(), t3lib_extFileFunctions::func_edit(), t3lib_extFileFunctions::func_move(), t3lib_extFileFunctions::func_newfile(), t3lib_extFileFunctions::func_rename(), t3lib_extFileFunctions::func_unzip(), t3lib_extFileFunctions::func_upload(), template::getFileheader(), SC_mod_tools_em_index::getFileListOfExtension(), t3lib_TStemplate::getFileName(), tslib_cObj::getImgResource(), t3lib_basicFileFunctions::getTotalFileInfo(), t3lib_basicFileFunctions::getUniqueName(), t3lib_stdGraphic::IMreduceColors(), tx_tstemplateinfo::main(), tslib_cObj::MULTIMEDIA(), tx_tstemplateinfo::procesResources(), fileList::readDirectory(), SC_show_item::renderFileInfo(), SC_mod_tools_em_index::showExtDetails(), t3lib_BEfunc::thumbCode(), t3lib_tsparser_ext::upload_copy_file(), and tx_impexp::writeFileVerify().

t3lib_div::dirname ( path  ) 

Returns the directory part of a path without trailing slash If there is no dir-part, then an empty string is returned. Behaviour:

'/dir1/dir2/script.php' => '/dir1/dir2' '/dir1/' => '/dir1' 'dir1/script.php' => 'dir1' 'd/script.php' => 'd' '/script.php' => '' '' => '' Usage: 5

Parameters:
string Directory name / path
Returns:
string Processed input value. See function description.

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

References revExplode().

t3lib_div::modifyHTMLColor ( color,
R,
G,
B 
)

Modifies a HTML Hex color by adding/subtracting $R,$G and $B integers Usage: 11

Parameters:
string A hexadecimal color code, xxxxxx
integer Offset value 0-255
integer Offset value 0-255
integer Offset value 0-255
Returns:
string A hexadecimal color code, xxxxxx, modified according to input vars
See also:
modifyHTMLColorAll()

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

References intInRange().

Referenced by modifyHTMLColorAll(), and t3lib_queryGenerator::printCodeArray().

t3lib_div::modifyHTMLColorAll ( color,
all 
)

Modifies a HTML Hex color by adding/subtracting $all integer from all R/G/B channels Usage: 6

Parameters:
string A hexadecimal color code, xxxxxx
integer Offset value 0-255 for all three channels.
Returns:
string A hexadecimal color code, xxxxxx, modified according to input vars
See also:
modifyHTMLColor()

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

References modifyHTMLColor().

Referenced by t3lib_TCEforms::t3lib_TCEforms().

t3lib_div::rm_endcomma ( string  ) 

Removes comma (if present) in the end of string Usage: 2

Parameters:
string String from which the comma in the end (if any) will be removed.
Returns:
string

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

Referenced by SC_mod_tools_dbint_index::func_records().

t3lib_div::danish_strtoupper ( string  ) 

strtoupper which converts danish (and other characters) characters as well Usage: 0

Parameters:
string String to process
Returns:
string
Deprecated:
Use t3lib_cs::conv_case() instead or for HTML output, wrap your content in ...)

Definition at line 1093 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.

ä => ae, Ö => Oe

Parameters:
string String to convert.
Deprecated:
Works only for western europe single-byte charsets! Use t3lib_cs::specCharsToASCII() instead!
Returns:
string

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

t3lib_div::testInt ( var  ) 

Tests if the input is an integer. Usage: 77

Parameters:
mixed Any input variable to test.
Returns:
boolean Returns true if string is an integer

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

Referenced by array2xml(), tslib_cObj::calcAge(), SC_wizard_table::changeFunc(), SC_wizard_forms::changeFunc(), tslib_fe::checkAndSetAlias(), t3lib_TCEmain::checkValue_inline(), t3lib_TCEmain::clear_cacheCmd(), user_feAdmin::compileMail(), t3lib_parsehtml::compileTagAttribs(), t3lib_loadDBGroup::convertPosNeg(), t3lib_TCEmain::copyRecord_procBasedOnFieldType(), t3lib_TCEforms_inline::createNewRecord(), debug(), tslib_fe::determineId(), SC_mod_user_ws_index::displayWorkspaceOverview_list(), t3lib_TCEmain::doesRecordExist(), SC_alt_main::editPageHandling(), SC_alt_shortcut::editPageIdFunc(), tslib_cObj::editPanelLinkWrap(), t3lib_matchCondition::evalConditionStr(), browse_links::expandPage(), t3lib_tsparser_ext::ext_getObjTree(), tslib_cObj::fillInMarkerArray(), t3lib_timeTrack::fixContent(), tslib_cObj::FORM(), t3lib_refindex::generateRefIndexData(), t3lib_TCEforms::getExcludeElements(), t3lib_BEfunc::getFlexFormDS(), tx_install::getItemArrayType(), t3lib_TCEforms::getLanguageIcon(), t3lib_BEfunc::getPidForModTSconfig(), t3lib_BEfunc::getRecordTitlePrep(), t3lib_TCEforms::getSingleField(), t3lib_TCEforms_inline::getSingleField_typeInline(), t3lib_BEfunc::getTSconfig_pidValue(), t3lib_softrefproc::getTypoLinkParts(), SC_wizard_add::init(), t3lib_clipboard::initializeClipboard(), TSpagegen::isAllowedLinkVarValue(), t3lib_loadDBGroup::isOnSymmetricSide(), tslib_cObj::listNum(), SC_wizard_edit::main(), SC_alt_shortcut::main(), SC_alt_doc::makeButtonPanel(), tslib_menu::makeMenu(), browse_links::parseCurUrl(), tslib_pibase::pi_getFFvalueFromSheetArray(), tslib_pibase::pi_isOnlyFields(), SC_alt_shortcut::preprocess(), t3lib_TCEmain::process_datamap(), tx_impexp::processSoftReferences_substTokens(), t3lib_loadDBGroup::readList(), t3lib_TCEforms_inline::renderCombinationTable(), t3lib_TCEforms_inline::renderForeignRecord(), SC_mod_web_ts_index::renderList(), SC_db_layout::renderQuickEdit(), t3lib_TCEforms::renderWizards(), tslib_cObj::SEARCHRESULT(), user_feAdmin::sendInfoMail(), t3lib_TCEforms_inline::setExpandedCollapsedState(), t3lib_TCEmain::setTSconfigPermissions(), t3lib_softrefproc::setTypoLinkPartsElement(), t3lib_parsehtml_proc::TS_links_rte(), tx_install::typo3TempManager(), tslib_cObj::typoLink(), tx_tstemplateobjbrowser::verify_TSobjects(), SC_mod_tools_be_user_index::whoIsOnline(), t3lib_arrayBrowser::wrapArrayKey(), and t3lib_loadDBGroup::writeForeignField().

t3lib_div::isFirstPartOfStr ( str,
partStr 
)

Returns true if the first part of $str matches the string $partStr Usage: 59

Parameters:
string Full string to check
string Reference string which must be found as the "first part" of the full string
Returns:
boolean True if $partStr was found to be equal to the first part of $str

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

Referenced by tx_sysaction::action_getUserMainDir(), t3lib_userAuthGroup::addFileMount(), t3lib_extMgm::addService(), tslib_cObj::callUserFunction(), callUserFunction(), tx_indexedsearch_crawler::checkDeniedSuburls(), t3lib_basicFileFunctions::checkPathAgainstMounts(), tx_indexedsearch_crawler::checkUrl(), t3lib_refindex::createEntryData_fileRels(), tx_rtehtmlarea_select_image::createFolder(), tx_rtehtmlarea_browse_links::createFolder(), browse_links::createFolder(), SC_view_help::createGlossaryIndex(), t3lib_stdGraphic::createTempSubDir(), t3lib_matchCondition::evalConditionStr(), t3lib_basicFileFunctions::findFirstWebFolder(), t3lib_softrefproc::findRef_images(), t3lib_softrefproc::findRef_TStemplate(), SC_mod_tools_em_index::first_in_array(), t3lib_extFileFunctions::func_copy(), t3lib_extFileFunctions::func_move(), SC_mod_tools_em_index::getClassIndexLocallangFiles(), getFileAbsFileName(), t3lib_BEfunc::getPathType_web_nonweb(), tx_impexp::getRTEoriginalFilename(), getUserObj(), t3lib_parsehtml::HTMLcleaner(), t3lib_basicFileFunctions::is_webpath(), isAllowedAbsPath(), browse_links::isWebFolder(), fileList::linkWrapFile(), llXmlAutoFileName(), tx_lowlevel_rte_images::main(), tx_lowlevel_lost_files::main(), tx_lowlevel_double_files::main(), SC_mod_tools_em_index::makeDetailedExtensionAnalysis(), SC_show_item::makeRef(), fileList::makeRef(), tslib_fe::pageNotFoundHandler(), browse_links::parseCurUrl(), tx_impexp::processSoftReferences_saveFile(), tx_impexp::processSoftReferences_saveFile_createRelFile(), t3lib_BEfunc::referenceCount(), SC_mod_tools_em_index::removeExtDirectory(), removePrefixPathFromList(), SC_view_help::render_TOC(), SC_show_item::renderFileInfo(), t3lib_softrefproc::setTypoLinkPartsElement(), SC_mod_tools_em_index::showExtDetails(), tslib_fe::statistics(), t3lib_parsehtml_proc::TS_images_db(), tx_install::typo3conf_edit(), unlink_tempfile(), tx_impexp::unlinkTempFiles(), tx_rtehtmlarea_select_image::uploadForm(), tx_rtehtmlarea_browse_links::uploadForm(), browse_links::uploadForm(), tx_impexp::verifyFolderAccess(), and writeFileToTypo3tempDir().

t3lib_div::formatSize ( sizeInBytes,
labels = '' 
)

Formats the input integer $sizeInBytes as bytes/kilobytes/megabytes (-/K/M) Usage: 53

Parameters:
integer Number of bytes to format.
string Labels for bytes, kilo, mega and giga separated by vertical bar (|) and possibly encapsulated in "". Eg: " | K| M| G" (which is the default value)
Returns:
string Formatted representation of the byte number, for output.

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

Referenced by tslib_cObj::bytes(), t3lib_TCEmain::checkValue_group_select_file(), tx_impexp::export_addRecord(), SC_mod_tools_log_index::exportData(), SC_mod_tools_em_index::extDumpTables(), t3lib_tsfeBeUserAuth::extGetCategory_info(), fileList::formatFileList(), t3lib_TCEforms::formatValue(), SC_mod_tools_isearch_index::getPhashExternalDocs(), SC_mod_tools_isearch_index::getPhashT3pages(), tx_rtehtmlarea_user::main_user(), tx_indexedsearch::makeInfo(), and tx_install::typo3conf_edit().

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 1184 of file class.t3lib_div.php.

t3lib_div::splitCalc ( string,
operators 
)

This splits a string by the chars in $operators (typical /+-*) and returns an array with them in Usage: 2

Parameters:
string Input string, eg "123 + 456 / 789 - 4"
string Operators to split by, typically "/+-*"
Returns:
array Array with operators and operands separated.
See also:
tslib_cObj::calc(), tslib_gifBuilder::calcOffset()

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

Referenced by tslib_cObj::calc(), and tslib_gifBuilder::calcOffset().

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 1220 of file class.t3lib_div.php.

Referenced by calcParenthesis().

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 1261 of file class.t3lib_div.php.

References calcPriority().

Referenced by tslib_cObj::stdWrap().

t3lib_div::htmlspecialchars_decode ( value  ) 

Inverse version of htmlspecialchars() Usage: 4

Parameters:
string Value where >, <, " and & should be converted to regular chars.
Returns:
string Converted result.

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

Referenced by tx_indexedsearch_indexer::extractLinks(), t3lib_softrefproc::findRef_images(), t3lib_softrefproc::findRef_TStemplate(), t3lib_parsehtml::get_tag_attributes(), tx_indexedsearch_crawler::indexExtUrl(), SC_alt_doc::makeDocSel(), and user_plaintext::parseBody().

t3lib_div::deHSCentities ( str  ) 

Re-converts HTML entities if they have been converted by htmlspecialchars() Usage: 10

Parameters:
string String which contains eg. "&amp;amp;" which should stay "&amp;". Or "&amp;#1234;" to "&#1234;". Or "&amp;#x1b;" to "&#x1b;"
Returns:
string Converted result.

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

Referenced by t3lib_parsehtml::bidir_htmlspecialchars(), tslib_cObj::FORM(), t3lib_BEfunc::getFuncMenu(), SC_mod_web_perm_index::getRecursiveSelect(), t3lib_TCEforms::getSingleField(), t3lib_TCEforms::getSingleField_typeSelect_checkbox(), t3lib_TCEforms::getSingleField_typeSelect_singlebox(), template::getTabMenu(), language::sL(), and tslib_cObj::stdWrap().

t3lib_div::slashJS ( string,
extended = 0,
char = "'" 
)

This function is used to escape any ' -characters when transferring text to JavaScript! Usage: 3

Parameters:
string String to escape
boolean If set, also backslashes are escaped.
string The character to escape, default is ' (single-quote)
Returns:
string Processed input string

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

t3lib_div::rawUrlEncodeJS ( str  ) 

Version of rawurlencode() where all spaces (20) are re-converted to space-characters. Usefull when passing text to JavaScript where you simply url-encode it to get around problems with syntax-errors, linebreaks etc. Usage: 4

Parameters:
string String to raw-url-encode with spaces preserved
Returns:
string Rawurlencoded result of input string, but with all 20 (space chars) converted to real spaces.

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

t3lib_div::rawUrlEncodeFP ( str  ) 

rawurlencode which preserves "/" chars Usefull when filepaths should keep the "/" chars, but have all other special chars encoded. Usage: 5

Parameters:
string Input string
Returns:
string Output string

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

Referenced by tx_rtehtmlarea_select_image::expandFolder().

t3lib_div::validEmail ( email  ) 

Checking syntax of input email address Usage: 5

Parameters:
string Input string to evaluate
Returns:
boolean Returns true if the $email address (input string) is valid; Has a "@", domain name with at least one period and only allowed a-z characters.

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

Referenced by tslib_cObj::checkEmail(), t3lib_readmail::extractNameEmail(), tslib_menu::link(), recordList::linkUrlMail(), and t3lib_formmail::start().

t3lib_div::formatForTextarea ( content  ) 

Formats a string for output between <textarea>-tags All content outputted in a textarea form should be passed through this function Not only is the content htmlspecialchar'ed on output but there is also a single newline added in the top. The newline is necessary because browsers will ignore the first newline after <textarea> if that is the first character. Therefore better set it! Usage: 23

Parameters:
string Input string to be formatted.
Returns:
string Formatted for <textarea>-tags

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

Referenced by t3lib_rteapi::drawRTE(), tslib_cObj::FORM(), t3lib_TCEforms::getSingleField_typeText(), tx_tstemplateinfo::main(), SC_file_edit::main(), SC_mod_tools_log_index::makeSaveForm(), SC_mod_tools_em_index::showExtDetails(), and tx_install::typo3conf_edit().

t3lib_div::inArray ( in_array,
item 
)

Check if an item exists in an array Please note that the order of parameters is reverse compared to the php4-function in_array()!!! Usage: 3

Parameters:
array one-dimensional array of items
string item to check for
Returns:
boolean true if $item is in the one-dimensional array $in_array

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

Referenced by t3lib_BEfunc::blindGroupNames(), and tslib_menu::filterMenuPages().

t3lib_div::intExplode ( delim,
string 
)

Explodes a $string delimited by $delim and passes each item in the array through intval(). Corresponds to explode(), but with conversion to integers for all values. Usage: 76

Parameters:
string Delimiter string to explode with
string The string to explode
Returns:
array Exploded values, all converted to integers

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

Referenced by t3lib_stdGraphic::adjust(), t3lib_stdGraphic::calcTextCordsForMap(), t3lib_queryGenerator::cleanInputVal(), t3lib_DB::cleanIntList(), t3lib_stdGraphic::copyGifOntoGif(), t3lib_stdGraphic::crop(), tslib_cObj::DBmayFEUserEditSelect(), tx_indexedsearch::doSearch(), ux_t3lib_DB::exec_SELECTquery(), tx_indexedsearch::execFinalQuery(), localPageTree::ext_tree(), local_beUserAuth::ext_workspaceMembership(), tslib_gmenu_foldout::extProc_finish(), tslib_tmenu_layers::extProc_init(), tslib_gmenu_layers::extProc_init(), tx_sysaction::fixUserGroup(), t3lib_TCEforms::getAdditionalPreviewLanguages(), tslib_menu::getBannedUids(), t3lib_pageSelect::getMultipleGroupsWhereClause(), tslib_fe::getPageShortcut(), tslib_cObj::getSlidePids(), tx_sv_auth::getSubGroups(), tslib_cObj::getWhere(), tslib_cObj::imageLinkWrap(), t3lib_stdGraphic::IMparams(), t3lib_TStemplate::includeStaticTypoScriptSources(), tx_indexedsearch::initialize(), SC_db_new_content_el::main(), SC_db_layout::main(), SC_move_el::main(), t3lib_stdGraphic::makeBox(), t3lib_stdGraphic::makeEmboss(), tslib_imgmenu::makeImageMap(), tslib_menu::makeMenu(), t3lib_queryGenerator::makeSelectorTable(), t3lib_stdGraphic::makeShadow(), t3lib_stdGraphic::objPosition(), TSpagegen::pagegenInit(), t3lib_TStemplate::processTemplate(), SC_db_layout::renderListContent(), SC_mod_tools_em_index::renderVersion(), t3lib_TCEforms::renderWizards(), tx_indexedsearch::sectionTableWhere(), tslib_fe::settingLanguage(), t3lib_stdGraphic::setWorkArea(), t3lib_stdGraphic::splitString(), tslib_menu::start(), tslib_gifBuilder::start(), tslib_controlTable::start(), tslib_tableOffset::start(), tslib_cObj::substring(), t3lib_BEfunc::titleAttribForPages(), t3lib_stdGraphic::txtPosition(), and t3lib_userAuthGroup::workspaceInit().

t3lib_div::revExplode ( delim,
string,
count = 0 
)

Reverse explode which explodes the string counting from behind. Thus t3lib_div::revExplode(':','my:words:here',2) will return array('my:words','here') Usage: 8

Parameters:
string Delimiter string to explode with
string The string to explode
integer Number of array entries
Returns:
array Exploded values

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

t3lib_div::trimExplode ( delim,
string,
onlyNonEmptyValues = 0 
)

Explodes a string and trims all values for whitespace in the ends. If $onlyNonEmptyValues is set, then all blank ('') values are removed. Usage: 256

Parameters:
string Delimiter string to explode with
string The string to explode
boolean If set, all empty values (='') will NOT be set in output
Returns:
array Exploded values

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

t3lib_div::uniqueArray ( valueArray  ) 

Remove duplicate values from an array Usage: 0

Parameters:
array Array of values to make unique
Returns:
array
Deprecated:
Use the PHP function array_unique instead

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

t3lib_div::removeArrayEntryByValue ( array,
cmpValue 
)

Removes the value $cmpValue from the $array if found there. Returns the modified array Usage: 3

Parameters:
array Array containing the values
string Value to search for and if found remove array entry where found.
Returns:
array Output array with entries removed if search string is found

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

Referenced by t3lib_TCEmain::checkValue_group_select_file(), tx_version_cm1::pageSubContent(), and tslib_menu::start().

t3lib_div::implodeArrayForUrl ( name,
theArray,
str = '',
skipBlank = 0,
rawurlencodeParamName = 0 
)

Implodes a multidim-array into GET-parameters (eg. &param[key][key2]=value2&param[key][key3]=value3) Usage: 24

Parameters:
string Name prefix for entries. Set to blank if you wish none.
array The (multidim) array to implode
string (keep blank)
boolean If set, parameters which were blank strings would be removed.
boolean If set, the param name itself (for example "param[key][key2]") would be rawurlencoded as well.
Returns:
string Imploded result, fx. &param[key][key2]=value2&param[key][key3]=value3
See also:
explodeUrl2Array()

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

Referenced by tx_rtehtmlarea_dam_browse_media::addDisplayOptions(), SC_alt_doc::compileStoreDat(), SC_alt_doc::functionMenus(), t3lib_BEfunc::getFuncCheck(), t3lib_BEfunc::getFuncInput(), t3lib_BEfunc::getFuncMenu(), tslib_cObj::getQueryArguments(), template::getTabMenu(), tslib_cObj::getTypoLink(), tx_rtehtmlarea_browse_links::init(), browse_links::init(), SC_alt_doc::init(), tx_indexedsearch::linkPage(), tx_cms_layout::linkRTEbutton(), linkThisScript(), linkThisUrl(), tslib_fe::makeCacheHash(), tx_indexedsearch_indexer::makeCHash(), template::makeShortcutUrl(), TSpagegen::pagegenInit(), tx_indexedsearch_modfunc1::printPhashRow(), SC_alt_doc::processData(), SC_db_new_content_el::removeInvalidElements(), SC_db_layout::renderQuickEdit(), and t3lib_TCEforms::renderWizards().

t3lib_div::explodeUrl2Array ( string,
multidim = FALSE 
)

Explodes a string with GETvars (eg. "&id=1&type=2&ext[mykey]=3") into an array

Parameters:
string GETvars string
boolean If set, the string will be parsed into a multidimensional array if square brackets are used in variable names (using PHP function parse_str())
Returns:
array Array of values. All values AND keys are rawurldecoded() as they properly should be. But this means that any implosion of the array again must rawurlencode it!
See also:
implodeArrayForUrl()

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

Referenced by SC_db_new_content_el::removeInvalidElements().

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 1566 of file class.t3lib_div.php.

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

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 1589 of file class.t3lib_div.php.

Referenced by _GETset().

t3lib_div::stripSlashesOnArray ( &$  theArray  ) 

StripSlash array This function traverses a multidimentional array and strips slashes to the values. NOTE that the input array is and argument by reference.!! Twin-function to addSlashesOnArray Usage: 10

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

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

Referenced by _GET(), _GP(), _POST(), t3lib_TCEmain::fillInFieldArray(), GParrayMerged(), and GPvar().

t3lib_div::slashArray ( arr,
cmd 
)

Either slashes ($cmd=add) or strips ($cmd=strip) array $arr depending on $cmd Usage: 0

Parameters:
array Multidimensional input array
string "add" or "strip", depending on usage you wish.
Returns:
array

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

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 1652 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(), t3lib_TStemplate::mergeConstantsFromPageTSconfig(), tslib_fe::mergingWithGetVars(), tslib_pibase::pi_linkTP_keepPIvars(), tslib_pibase::pi_setPiVarDefaults(), t3lib_TCEmain::process_cmdmap(), t3lib_BEfunc::RTEsetup(), language::sL(), and template::template().

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 1685 of file class.t3lib_div.php.

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

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, default is comman
string Quote-character to wrap around the values.
Returns:
string A single line of CSV

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

Referenced by t3lib_fullsearch::csvValues(), and localRecordList::setCsvRow().

t3lib_div::removeDotsFromTS ( ts  ) 

Removes dots "." from end of a key identifier of TypoScript styled array. array('key.' => array('property.' => 'value')) --> array('key' => array('property' => 'value'))

Parameters:
array $ts: TypoScript configuration array
Returns:
array TypoScript configuration array without dots at the end of all keys

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

Referenced by t3lib_TCEforms::overrideFieldConf().

t3lib_div::get_tag_attributes ( tag  ) 

Returns an array with all attributes of the input HTML tag as key/value pairs. Attributes are only lowercase a-z $tag is either a whole tag (eg '<TAG option="" attrib="VALUE>">') or the parameterlist (ex ' OPTION ATTRIB=VALUE>') If a attribute is empty (I call it 'an option'), then the value for the key is empty. You can check if it existed with isset() Usage: 8

Parameters:
string HTML-tag string (or attributes only)
Returns:
array Array with the attribute values.

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

References split_tag_attributes().

Referenced by tslib_cObj::_parseFunc(), tslib_cObj::addParams(), t3lib_TSparser::checkIncludeLines(), tslib_cObj::encaps_lineSplit(), tx_rtehtmlarea_browse_links::init(), browse_links::init(), tslib_pibase::pi_openAtagHrefInJSwindow(), tx_indexedsearch_indexer::splitHTMLContent(), and xmlGetHeaderAttribs().

t3lib_div::split_tag_attributes ( tag  ) 

Returns an array with the 'components' from an attribute list from an HTML tag. The result is normally analyzed by get_tag_attributes Removes tag-name if found Usage: 2

Parameters:
string HTML-tag string (or attributes only)
Returns:
array Array with the attribute values.

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

Referenced by get_tag_attributes().

t3lib_div::implodeAttributes ( arr,
xhtmlSafe = FALSE,
dontOmitBlankAttribs = FALSE 
)

Implodes attributes in the array $arr for an attribute list in eg. and HTML tag (with quotes) Usage: 14

Parameters:
array Array with attribute key/value pairs, eg. "bgcolor"=>"red", "border"=>0
boolean If set the resulting attribute list will have a) all attributes in lowercase (and duplicates weeded out, first entry taking precedence) and b) all values htmlspecialchar()'ed. It is recommended to use this switch!
boolean If true, don't check if values are blank. Default is to omit attributes with blank values.
Returns:
string Imploded attributes, eg. 'bgcolor="red" border="0"'

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

Referenced by tslib_cObj::addParams(), tslib_cObj::encaps_lineSplit(), implodeParams(), tx_rtehtmlarea_pi3::render_clickenlarge(), TSpagegen::renderContentWithHeader(), t3lib_parsehtml_proc::TS_images_db(), and t3lib_parsehtml_proc::TS_images_rte().

t3lib_div::implodeParams ( arr,
xhtmlSafe = FALSE,
dontOmitBlankAttribs = FALSE 
)

Implodes attributes in the array $arr for an attribute list in eg. and HTML tag (with quotes)

Parameters:
array See implodeAttributes()
boolean See implodeAttributes()
boolean See implodeAttributes()
Returns:
string See implodeAttributes()
Deprecated:
Name was changed into implodeAttributes
See also:
implodeAttributes()

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

References implodeAttributes().

t3lib_div::wrapJS ( string,
linebreak = TRUE 
)

Wraps JavaScript code XHTML ready with <script>-tags Automatic re-identing of the JS code is done by using the first line as ident reference. This is nice for identing JS code with PHP code on the same level.

Parameters:
string JavaScript code
boolean Wrap script element in linebreaks? Default is TRUE.
Returns:
string The wrapped JS code, ready to put into a XHTML page
Author:
Ingmar Schlecht <ingmars@web.de>

René Fritz <r.fritz@colorcube.de>

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

t3lib_div::xml2tree ( string,
depth = 999 
)

Parses XML input into a PHP array with associative keys Usage: 0

Parameters:
string XML data input
integer Number of element levels to resolve the XML into an array. Any further structure will be set as XML.
Returns:
mixed The array with the parsed structure unless the XML parser returns with an error in which case the error message string is returned.
Author:
bisqwit at iki dot fi dot not dot for dot ads dot invalid / http://dk.php.net/xml_parse_into_struct + kasperYYYY@typo3.com

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

References xmlRecompileFromStructValArray().

Referenced by tx_indexed_search_extparse::readFileContent().

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 1982 of file class.t3lib_div.php.

References array2xml().

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

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 greater than zero, then the number of spaces corresponding to this number is used for indenting, if less than zero - no indentation, if zero - 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 2023 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::xml2array ( string,
NSprefix = '',
reportDocTag = FALSE 
)

Converts an XML string to a PHP array. This is the reverse function of array2xml() Usage: 17

Parameters:
string XML content to convert into an array
string The tag-prefix resolve, eg. a namespace like "T3:"
boolean If set, the document tag will be set in the key "_DOCUMENT_TAG" of the output array
Returns:
mixed If the parsing had errors, a string with the error message is returned. Otherwise an array with the content.
See also:
array2xml()

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

Referenced by t3lib_TCEmain::checkValue_flex(), t3lib_TCEmain::copyRecord_procBasedOnFieldType(), SC_wizard_table::getConfigCode(), SC_wizard_forms::getConfigCode(), t3lib_BEfunc::getFlexFormDS(), t3lib_refindex::getRelations(), t3lib_TCEforms::getSingleField_typeFlex(), t3lib_syntaxhl::highLight_DS(), t3lib_syntaxhl::highLight_FF(), tx_impexp::loadFile(), tx_adodb_checkconnectionwizard::main(), tslib_pibase::pi_initPIflexForm(), tx_impexp::processSoftReferences(), tx_dbal_handler_xmldb::readDataSource(), readLLXMLfile(), t3lib_TCEmain::remapListedDBRecords(), t3lib_transferData::renderRecord_flexProc(), resolveSheetDefInDS(), tx_impexp::setFlexFormRelations(), t3lib_flexformtools::traverseFlexFormXMLData(), and tx_dbal_handler_xmldb::xmlDB_readStructure().

t3lib_div::xmlRecompileFromStructValArray ( vals  ) 

This implodes an array of XML parts (made with xml_parse_into_struct()) into XML again. Usage: 2

Parameters:
array A array of XML parts, see xml2tree
Returns:
string Re-compiled XML data.

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

Referenced by xml2tree().

t3lib_div::xmlGetHeaderAttribs ( xmlData  ) 

Extract the encoding scheme as found in the first line of an XML document (typically) Usage: 1

Parameters:
string XML data
Returns:
string Encoding scheme (lowercase), if found.

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

References get_tag_attributes().

Referenced by t3lib_TCEforms::getSingleField_typeFlex(), and t3lib_flexformtools::traverseFlexFormXMLData().

t3lib_div::getURL ( url,
includeHeader = 0,
requestHeaders = false 
)

Reads the file or url $url and returns the content If you are having trouble with proxys when reading URLs you can configure your way out of that with settings like $TYPO3_CONF_VARS['SYS']['curlUse'] etc. Usage: 83

Parameters:
string Filepath/URL to read
integer Whether the HTTP header should be fetched or not. 0=disable, 1=fetch header+content, 2=fetch header only
array HTTP headers to be used in the request
Returns:
string The content from the resource given as input.

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

Referenced by SC_mod_tools_em_terconnection::fetchExtension(), SC_mod_tools_em_index::fetchMetaData(), SC_mod_tools_em_terconnection::fetchTranslation(), SC_mod_tools_em_terconnection::fetchTranslationStatus(), t3lib_htmlmail::getMimeType(), t3lib_parsehtml_proc::getURL(), t3lib_htmlmail::getURL(), tx_indexedsearch_indexer::getUrlHeaders(), and tslib_fe::pageNotFoundHandler().

t3lib_div::writeFile ( file,
content 
)

Writes $content to the file $file Usage: 30

Parameters:
string Filepath to write to
string Content to write
Returns:
boolean True if the file was successfully opened and written to.

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

References fixPermissions().

Referenced by tx_dbal_handler_xmldb::admin_query(), ux_t3lib_DB::cacheFieldInfo(), SC_mod_tools_em_index::checkUploadFolder(), SC_mod_tools_log_index::exportData(), SC_mod_tools_em_index::extDumpTables(), SC_mod_tools_em_index::fetchMetaData(), t3lib_TCEmain::fillInFieldArray(), t3lib_extFileFunctions::func_edit(), t3lib_extFileFunctions::func_newfile(), t3lib_diff::getDiff(), tx_impexp::import_addFileNameToBeCopied(), SC_mod_tools_log_index::importData(), SC_mod_tools_em_index::importExtFromRep(), tx_indexedsearch_indexer::indexExternalUrl(), TSpagegen::inline2TempFile(), SC_mod_tools_em_index::installTranslationsForExtension(), tx_tstemplateinfo::main(), tx_impexp::processSoftReferences_saveFile_createRelFile(), tx_dbal_handler_xmldb::saveDataSource(), SC_mod_tools_em_index::showExtDetails(), t3lib_parsehtml_proc::TS_images_db(), tx_install::typo3conf_edit(), SC_mod_tools_em_index::updateLocalEM_CONF(), SC_mod_tools_em_index::updateTranslation(), t3lib_extMgm::writeCacheFiles(), writeFileToTypo3tempDir(), tx_impexp::writeFileVerify(), t3lib_install::writeToLocalconf_control(), SC_mod_tools_em_index::writeTYPO3_MOD_PATH(), and tx_dbal_handler_xmldb::xmlDB_writeStructure().

t3lib_div::fixPermissions ( file  ) 

Setting file system mode & group ownership of file

Parameters:
string Filepath of newly created file
Returns:
void

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

Referenced by tx_rtehtmlarea_base::buildJSFile(), t3lib_stdGraphic::combineExec(), t3lib_extFileFunctions::func_copy(), tslib_fe::getConfigArray(), t3lib_stdGraphic::imageMagickExec(), upload_copy_move(), writeFile(), and tx_rtehtmlarea_base::writeJSFileToTypo3tempDir().

t3lib_div::writeFileToTypo3tempDir ( filepath,
content 
)

Writes $content to a filename in the typo3temp/ folder (and possibly one or two subfolders...) Accepts an additional subdirectory in the file path!

Parameters:
string Absolute filepath to write to inside "typo3temp/". First part of this string must match PATH_site."typo3temp/"
string Content string to write
Returns:
string Returns false on success, otherwise an error string telling about the problem.

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

References dirname(), isFirstPartOfStr(), mkdir_deep(), validPathStr(), and writeFile().

Referenced by t3lib_cs::initCaseFolding(), t3lib_cs::initCharset(), t3lib_cs::initToASCII(), t3lib_cs::initUnicodeData(), tslib_fe::pageCachePostProcess(), readLLXMLfile(), and t3lib_TCEmain::version_swap().

t3lib_div::mkdir ( theNewFolder  ) 

Wrapper function for mkdir, setting folder permissions according to $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'] and group ownership according to $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup'] Usage: 6

Parameters:
string Absolute path to folder, see PHP mkdir() function. Removes trailing slash internally.
Returns:
boolean TRUE if went well!

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

Referenced by tx_install::checkDirs(), tx_impexp::checkOrCreateDir(), SC_mod_tools_em_index::checkUploadFolder(), SC_mod_tools_em_index::clearAndMakeExtensionDir(), t3lib_stdGraphic::createTempSubDir(), t3lib_extFileFunctions::func_newfolder(), tx_rtehtmlarea_pi1::main(), and tx_impexp::processSoftReferences_saveFile_createRelFile().

t3lib_div::mkdir_deep ( destination,
deepDir 
)

Creates a directory - including parent directories if necessary - in the file system

Parameters:
string Base folder. This must exist! Must have trailing slash! Example "/root/typo3site/"
string Deep directory to create, eg. "xx/yy/" which creates "/root/typo3site/xx/yy/" if $destination is "/root/typo3site/"
Returns:
string If error, returns error string.

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

Referenced by SC_mod_tools_em_index::createDirsInPath(), SC_mod_tools_em_index::installTranslationsForExtension(), SC_mod_tools_em_index::updateTranslation(), and writeFileToTypo3tempDir().

t3lib_div::get_dirs ( path  ) 

Returns an array with the names of folders in a specific path Will return 'error' (string) if there were an error with reading directory content. Usage: 11

Parameters:
string Path to list directories from
Returns:
array Returns an array with the directory entries as values. If no path, the return value is nothing.

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

Referenced by tx_indexedsearch_crawler::crawler_execute_type2(), SC_mod_tools_dbint_index::findFile(), SC_mod_tools_dbint_index::func_filesearch(), getAllFilesAndFoldersInPath(), t3lib_folderTree::getCount(), filelistFolderTree::getFolderTree(), t3lib_folderTree::getFolderTree(), SC_mod_tools_em_index::getInstExtList(), and SC_mod_tools_em_index::makeDetailedExtensionAnalysis().

t3lib_div::getFilesInDir ( path,
extensionList = '',
prependPath = 0,
order = '',
excludePattern = '' 
)

Returns an array with the names of files in a specific path Usage: 18

Parameters:
string $path: Is the path to the file
string $extensionList is the comma list of extensions to read only (blank = all)
boolean If set, then the path is prepended the filenames. Otherwise only the filenames are returned in the array
string $order is sorting: 1= sort alphabetically, 'mtime' = sort by modification time.
string A comma seperated list of filenames to exclude, no wildcards
Returns:
array Array of the files found

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

Referenced by tx_rtehtmlarea_select_image::expandFolder(), browse_links::expandFolder(), SC_mod_tools_log_index::exportData(), SC_mod_tools_dbint_index::findFile(), getAllFilesAndFoldersInPath(), SC_mod_tools_em_index::getInstExtList(), SC_mod_tools_log_index::importData(), tx_impexp_modfunc1::main(), tx_rtehtmlarea_user::main_user(), SC_index::makeLoginBoxImage(), SC_mod_tools_log_index::makeSaveForm(), tx_install::stepOutput(), browse_links::TBE_dragNDrop(), browse_links::TBE_expandFolder(), tx_install::typo3conf_edit(), and tx_install::typo3TempManager().

t3lib_div::getAllFilesAndFoldersInPath ( fileArr,
path,
extList = '',
regDirs = 0,
recursivityLevels = 99,
excludePattern = '' 
)

Recursively gather all files and folders of a path. Usage: 5

Parameters:
array $fileArr: Empty input array (will have files added to it)
string $path: The path to read recursively from (absolute) (include trailing slash!)
string $extList: Comma list of file extensions: Only files with extensions in this list (if applicable) will be selected.
boolean $regDirs: If set, directories are also included in output.
integer $recursivityLevels: The number of levels to dig down...
string $excludePattern: regex pattern of files/directories to exclude
Returns:
array An array with the found files/directories.

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

References array_merge(), get_dirs(), and getFilesInDir().

Referenced by t3lib_TCEforms::addSelectOptionsToItemArray(), tx_indexedsearch_crawler::crawler_execute_type2(), SC_mod_tools_em_index::getClassIndexLocallangFiles(), SC_mod_tools_em_index::getFileListOfExtension(), tx_lowlevel_lost_files::main(), and SC_mod_tools_em_index::removeExtDirectory().

t3lib_div::removePrefixPathFromList ( fileArr,
prefixToRemove 
)

Removes the absolute part of all files/folders in fileArr Usage: 2

Parameters:
array $fileArr: The file array to remove the prefix from
string $prefixToRemove: The prefix path to remove (if found as first part of string!)
Returns:
array The input $fileArr processed.

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

References isFirstPartOfStr().

Referenced by t3lib_TCEforms::addSelectOptionsToItemArray(), tx_indexedsearch_crawler::crawler_execute_type2(), SC_mod_tools_em_index::getClassIndexLocallangFiles(), tx_lowlevel_lost_files::main(), and SC_mod_tools_em_index::removeExtDirectory().

t3lib_div::fixWindowsFilePath ( theFile  ) 

Fixes a path for windows-backslashes and reduces double-slashes to single slashes Usage: 2

Parameters:
string File path to process
Returns:
string

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

Referenced by t3lib_TCEmain::checkValue_group_select_file().

t3lib_div::resolveBackPath ( pathStr  ) 

Resolves "../" sections in the input path string. For example "fileadmin/directory/../other_directory/" will be resolved to "fileadmin/other_directory/" Usage: 2

Parameters:
string File path in which "/../" is resolved
Returns:
string

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

Referenced by t3lib_loadModules::checkMod(), alt_menu_functions::getNavFramePrefix(), SC_index::makeLoginBoxImage(), t3lib_stdGraphic::prependAbsolutePath(), tx_impexp::processSoftReferences_saveFile_createRelFile(), and alt_menu_functions::topMenu().

t3lib_div::locationHeaderUrl ( path  ) 

Prefixes a URL used with 'header-location' with 'http://...' depending on whether it has it already.

Parameters:
string URL / path to prepend full URL addressing to.
Returns:
string

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

References getIndpEnv().

Referenced by SC_index::checkRedirect(), SC_alt_doc::closeDocument(), SC_tce_file::finish(), SC_tce_db::finish(), tslib_fe::getConfigArray(), SC_wizard_table::getConfigCode(), SC_wizard_forms::getConfigCode(), SC_mod_tools_log_index::importData(), SC_wizard_add::init(), SC_index::init(), recordList::localizationRedirect(), SC_alt_doc::localizationRedirect(), SC_logout::logout(), SC_wizard_list::main(), SC_wizard_edit::main(), SC_wizard_add::main(), SC_mod_user_ws_workspaceForms::main(), recordHistory::main(), tx_install::outputExitBasedOnStep(), tslib_fe::pageNotFoundHandler(), SC_mod_web_view_index::printContent(), SC_db_layout::renderQuickEdit(), SC_mod_tools_em_index::requestInstallExtensions(), SC_alt_doc::setDocument(), tx_beuser_switchbackuser::switchBack(), and SC_mod_tools_be_user_index::switchUser().

t3lib_div::debug_ordvalue ( string,
characters = 100 
)

Returns a string with a list of ascii-values for the first $characters characters in $string Usage: 0

Parameters:
string String to show ASCII value for
integer Number of characters to show
Returns:
string The string with ASCII values in separated by a space char.

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

t3lib_div::view_array ( array_in  ) 

Returns HTML-code, which is a visual representation of a multidimensional array use t3lib_div::print_array() in order to print an array Returns false if $array_in is not an array Usage: 31

Parameters:
array Array to view
Returns:
string HTML output

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

Referenced by t3lib_DB::debug(), SC_mod_tools_em_index::extensionListRow(), SC_mod_tools_em_index::extInformationArray(), tslib_cObj::getData(), t3lib_fullsearch::getQueryResultCode(), makeInstanceService(), tx_install::phpinformation(), print_array(), tx_impexp::printErrorLog(), t3lib_timeTrack::printTSlog(), tx_lowlevel_cleaner::quickDBlookUp(), tx_indexedsearch_modfunc1::reindexPhash(), and tx_indexedsearch_modfunc1::showDetailsForPhash().

t3lib_div::print_array ( array_in  ) 

Prints an array Usage: 6

Parameters:
array Array to print visually (in a table).
Returns:
void

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

References view_array().

Referenced by debug().

t3lib_div::debug ( var = "",
brOrHeader = 0 
)

Makes debug output Prints $var in bold between two vertical lines If not $var the word 'debug' is printed If $var is an array, the array is printed by t3lib_div::print_array() Usage: 8

Parameters:
mixed Variable to print
mixed If the parameter is a string it will be used as header. Otherwise number of break tags to apply after (positive integer) or before (negative integer) the output.
Returns:
void

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

References print_array(), and testInt().

Referenced by callUserFunction(), debugRows(), tx_install::generateConfigForm(), getUserObj(), and tx_install::init().

t3lib_div::debug_trail (  ) 

Displays the "path" of the function call stack in a string, using debug_backtrace

Returns:
string

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

Referenced by t3lib_DB::debug().

t3lib_div::debugRows ( rows,
header = '' 
)

Displays an array as rows in a table. Useful to debug output like an array of database records.

Parameters:
array Array of arrays with similar keys
string Table header
Returns:
void Outputs to browser.

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

References debug().

t3lib_div::getThisUrl (  ) 

Returns the HOST+DIR-PATH of the current script (The URL, but without 'http://' and without script-filename) Usage: 1

Returns:
string

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

References dirname(), and getIndpEnv().

t3lib_div::linkThisScript ( getParams = array()  ) 

Returns the link-url to the current script. In $getParams you can set associative keys corresponding to the GET-vars you wish to add to the URL. If you set them empty, they will remove existing GET-vars from the current URL. REMEMBER to always use htmlspecialchars() for content in href-properties to get ampersands converted to entities (XHTML requirement and XSS precaution) Usage: 52

Parameters:
array Array of GET parameters to include
Returns:
string

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

References _GET(), getIndpEnv(), and implodeArrayForUrl().

Referenced by t3lib_clipboard::deleteUrl(), template::getVersionSelector(), ext_posMap_tt_content::linkPageTitle(), ext_posMap_pages::linkPageTitle(), tx_cms_layout::linkRTEbutton(), SC_db_layout::local_linkThisScript(), SC_wizard_rte::main(), tx_extrapagecmoptions::main(), t3lib_clipboard::pasteUrl(), t3lib_clipboard::printClipboard(), template::redirectUrls(), t3lib_clipboard::removeUrl(), t3lib_clipboard::selUrlDB(), t3lib_clipboard::selUrlFile(), SC_alt_doc::shortCutLink(), SC_mod_tools_em_index::showExtDetails(), t3lib_TCEforms::thisReturnUrl(), and SC_mod_tools_em_index::updatesForm().

t3lib_div::linkThisUrl ( url,
getParams = array() 
)

Takes a full URL, $url, possibly with a querystring and overlays the $getParams arrays values onto the quirystring, packs it all together and returns the URL again. So basically it adds the parameters in $getParams to an existing URL, $url Usage: 2

Parameters:
string URL string
array Array of key/value pairs for get parameters to add/overrule with. Can be multidimensional.
Returns:
string Output URL with added getParams.

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

References array_merge_recursive_overrule(), and implodeArrayForUrl().

t3lib_div::getIndpEnv ( getEnvName  ) 

Abstraction method which returns System Environment Variables regardless of server OS, CGI/MODULE version etc. Basically this is SERVER variables for most of them. This should be used instead of getEnv() and $_SERVER/ENV_VARS to get reliable values for all situations. Usage: 221

Parameters:
string Name of the "environment variable"/"server variable" you wish to use. Valid values are SCRIPT_NAME, SCRIPT_FILENAME, REQUEST_URI, PATH_INFO, REMOTE_ADDR, REMOTE_HOST, HTTP_REFERER, HTTP_HOST, HTTP_USER_AGENT, HTTP_ACCEPT_LANGUAGE, QUERY_STRING, TYPO3_DOCUMENT_ROOT, TYPO3_HOST_ONLY, TYPO3_HOST_ONLY, TYPO3_REQUEST_HOST, TYPO3_REQUEST_URL, TYPO3_REQUEST_SCRIPT, TYPO3_REQUEST_DIR, TYPO3_SITE_URL, _ARRAY
Returns:
string Value based on the input key, independent of server/os environment.

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

References dirname(), getIndpEnv(), and trimExplode().

t3lib_div::milliseconds (  ) 

milliseconds microtime recalculated to t3lib_div::milliseconds(1/1000 sec) Usage: 20

Returns:
integer

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

Referenced by tx_indexedsearch::doSearch(), ux_t3lib_DB::exec_DELETEquery(), ux_t3lib_DB::exec_INSERTquery(), ux_t3lib_DB::exec_SELECTquery(), ux_t3lib_DB::exec_UPDATEquery(), tx_indexedsearch_indexer::indexRegularDocument(), tx_indexedsearch_indexer::indexTypo3PageContent(), and tx_lowlevel_orphan_records::main().

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 3226 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::getHostname ( requestHost = TRUE  ) 

Get the fully-qualified domain name of the host. Usage: 2

Parameters:
boolean Use request host (when not in CLI mode).
Returns:
string The fully-qualified host name.

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

Referenced by t3lib_htmlmail::start().

t3lib_div::getFileAbsFileName ( filename,
onlyRelative = 1,
relToTYPO3_mainDir = 0 
)

Returns the absolute filename of a relative reference, resolves the "EXT:" prefix (way of referring to files inside extensions) and checks that the file is inside the PATH_site of the TYPO3 installation and implies a check with t3lib_div::validPathStr(). Returns false if checks failed. Does not check if the file exists. Usage: 24

Parameters:
string The input filename/filepath to evaluate
boolean If $onlyRelative is set (which it is by default), then only return values relative to the current PATH_site is accepted.
boolean If $relToTYPO3_mainDir is set, then relative paths are relative to PATH_typo3 constant - otherwise (default) they are relative to PATH_site
Returns:
string Returns the absolute filename of $filename IF valid, otherwise blank string.

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

References t3lib_extMgm::extPath(), isAbsPath(), isFirstPartOfStr(), t3lib_extMgm::isLoaded(), and validPathStr().

Referenced by t3lib_TCEforms::addSelectOptionsToItemArray(), callUserFunction(), t3lib_TSparser::checkIncludeLines(), tx_impexp::checkOrCreateDir(), tx_indexedsearch_crawler::crawler_execute_type2(), tx_impexp::export_addFilesFromRelations(), tx_indexedsearch_indexer::extractLinks(), t3lib_softrefproc::fileadminReferences(), t3lib_softrefproc::findRef_images(), t3lib_softrefproc::findRef_TStemplate(), t3lib_BEfunc::getFlexFormDS(), t3lib_TCEforms::getIcon(), t3lib_TCEforms::getSingleField_typeGroup(), t3lib_transl8tools::getSystemLanguages(), getUserObj(), ux_t3lib_DB::handler_init(), SC_mod_tools_log_index::importData(), tx_indexedsearch_indexer::indexRegularDocument(), SC_wizard_colorpicker::init(), tx_dbal_handler_xmldb::init(), tx_dbal_handler_openoffice::init(), t3lib_cs::initCaseFolding(), t3lib_cs::initCharset(), t3lib_cs::initToASCII(), t3lib_cs::initUnicodeData(), tx_tstemplateinfo::main(), tx_rtehtmlarea_pi1::main(), tx_lowlevel_lost_files::main_autoFix(), tx_lowlevel_double_files::main_autoFix(), SC_view_help::make_seeAlso(), makeInstanceService(), tx_indexedsearch::makeItemTypeIcon(), tx_indexedsearch_modfunc1::makeItemTypeIcon(), SC_index::makeLoginBoxImage(), tslib_fe::pageNotFoundHandler(), t3lib_TCEforms::previewFieldValue(), SC_view_help::printImage(), tx_impexp::processSoftReferences_saveFile(), tx_impexp::processSoftReferences_saveFile_createRelFile(), readLLfile(), readLLXMLfile(), tx_cssstyledcontent_pi1::render_uploads(), t3lib_TCEforms::renderWizards(), resolveSheetDefInDS(), tx_dbal_handler_xmldb::saveDataSource(), t3lib_softrefproc::setTypoLinkPartsElement(), t3lib_parsehtml_proc::TS_images_db(), tx_impexp::writeFileVerify(), and tx_rtehtmlarea_base::writeJSFileToTypo3tempDir().

t3lib_div::validPathStr ( theFile  ) 

Checks for malicious file paths. Returns true if no '//', '..' or '\' is in the $theFile This should make sure that the path is not pointing 'backwards' and further doesn't contain double/back slashes. So it's compatible with the UNIX style path strings valid for TYPO3 internally. Usage: 14

Parameters:
string Filepath to evaluate
Returns:
boolean True, if no '//', '\', '/../' is in the $theFile and $theFile doesn't begin with '../'
Todo:
Possible improvement: Should it rawurldecode the string first to check if any of these characters is encoded ?

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

Referenced by t3lib_userAuthGroup::addFileMount(), tslib_cObj::clean_directory(), t3lib_parsehtml_proc::evalWriteFile(), getFileAbsFileName(), t3lib_cs::initCharset(), t3lib_cs::initUnicodeData(), isAllowedAbsPath(), t3lib_basicFileFunctions::isPathValid(), tx_install::typo3conf_edit(), unlink_tempfile(), and writeFileToTypo3tempDir().

t3lib_div::isAbsPath ( path  ) 

Checks if the $path is absolute or relative (detecting either '/' or 'x:/' as first part of string) and returns true if so. Usage: 8

Parameters:
string Filepath to evaluate
Returns:
boolean

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

Referenced by tslib_cObj::clean_directory(), tx_indexedsearch_crawler::crawler_execute_type2(), tslib_fe::getConfigArray(), getFileAbsFileName(), tx_indexedsearch_indexer::indexRegularDocument(), isAllowedAbsPath(), loadTCA(), alt_menu_functions::mIconFile(), alt_menu_functions::mIconFilename(), SC_alt_shortcut::mIconFilename(), and t3lib_stdGraphic::prependAbsolutePath().

t3lib_div::isAllowedAbsPath ( path  ) 

Returns true if the path is absolute, without backpath '..' and within the PATH_site OR within the lockRootPath Usage: 5

Parameters:
string Filepath to evaluate
Returns:
boolean

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

References isAbsPath(), isFirstPartOfStr(), and validPathStr().

Referenced by t3lib_svbase::checkInputFile(), tx_indexedsearch_crawler::crawler_execute_type2(), t3lib_clipboard::exportClipElementParameters(), SC_mod_tools_log_index::exportData(), tx_indexedsearch_indexer::extractLinks(), tslib_fe::getConfigArray(), tx_indexedsearch_indexer::indexRegularDocument(), SC_show_item::init(), t3lib_clipboard::printContentFromTab(), clickMenu::printFileClickMenu(), and t3lib_svbase::writeFile().

t3lib_div::verifyFilenameAgainstDenyPattern ( filename  ) 

Verifies the input filename againts the 'fileDenyPattern'. Returns true if OK. Usage: 2

Parameters:
string Filepath to evaluate
Returns:
boolean

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

Referenced by t3lib_basicFileFunctions::checkIfAllowed(), and user_feAdmin::processFiles().

t3lib_div::upload_copy_move ( source,
destination 
)

Moves $source file to $destination if uploaded, otherwise try to make a copy Usage: 4

Parameters:
string Source file, absolute path
string Destination file, absolute path
Returns:
boolean Returns true if the file was moved. Dennis Petersen <fessor@software.dk>
See also:
upload_to_tempfile()

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

References fixPermissions().

Referenced by t3lib_TCEmain::checkValue_group_select_file(), t3lib_extFileFunctions::func_upload(), tx_lowlevel_double_files::main_autoFix(), and user_feAdmin::processFiles().

t3lib_div::upload_to_tempfile ( uploadedFileName  ) 

Will move an uploaded file (normally in "/tmp/xxxxx") to a temporary filename in PATH_site."typo3temp/" from where TYPO3 can use it under safe_mode. Use this function to move uploaded files to where you can work on them. REMEMBER to use t3lib_div::unlink_tempfile() afterwards - otherwise temp-files will build up! They are NOT automatically deleted in PATH_site."typo3temp/"! Usage: 6

Parameters:
string The temporary uploaded filename, eg. $_FILES['[upload field name here]']['tmp_name']
Returns:
string If a new file was successfully created, return its filename, otherwise blank string.
See also:
unlink_tempfile(), upload_copy_move()

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

References tempnam().

Referenced by SC_mod_tools_em_index::importExtFromRep(), tx_tstemplateinfo::main(), user_feAdmin::processFiles(), t3lib_formmail::start(), and t3lib_tsparser_ext::upload_copy_file().

t3lib_div::unlink_tempfile ( uploadedTempFileName  ) 

Deletes (unlink) a temporary filename in 'PATH_site."typo3temp/"' given as input. The function will check that the file exists, is in PATH_site."typo3temp/" and does not contain back-spaces ("../") so it should be pretty safe. Use this after upload_to_tempfile() or tempnam() from this class! Usage: 9

Parameters:
string Filepath for a file in PATH_site."typo3temp/". Must be absolute.
Returns:
boolean Returns true if the file was unlink()'ed
See also:
upload_to_tempfile(), tempnam()

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

References isFirstPartOfStr(), and validPathStr().

Referenced by SC_mod_tools_em_index::fetchMetaData(), SC_mod_tools_log_index::importData(), SC_mod_tools_em_index::importExtFromRep(), user_feAdmin::init(), tx_tstemplateinfo::main(), tx_rtehtmlarea_pi1::main(), tx_rtehtmlarea_pi1::spellCheckHandler(), t3lib_formmail::start(), tx_impexp::unlinkTempFiles(), t3lib_svbase::unlinkTempFiles(), and t3lib_tsparser_ext::upload_copy_file().

t3lib_div::tempnam ( filePrefix  ) 

Create temporary filename (Create file with unique file name) This function should be used for getting temporary filenames - will make your applications safe for open_basedir = on REMEMBER to delete the temporary files after use! This is done by t3lib_div::unlink_tempfile() Usage: 7

Parameters:
string Prefix to temp file (which will have no extension btw)
Returns:
string result from PHP function tempnam() with PATH_site.'typo3temp/' set for temp path.
See also:
unlink_tempfile(), upload_to_tempfile()

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

Referenced by SC_mod_tools_em_index::fetchMetaData(), t3lib_diff::getDiff(), tx_impexp::import_addFileNameToBeCopied(), tx_indexedsearch_indexer::indexExternalUrl(), tx_tstemplateinfo::main(), tx_rtehtmlarea_pi1::main(), tx_indexed_search_extparse::readFileContent(), tx_rtehtmlarea_pi1::spellCheckHandler(), t3lib_svbase::tempFile(), tslib_fe::tidyHTML(), and upload_to_tempfile().

t3lib_div::stdAuthCode ( uid_or_record,
fields = '',
codeLength = 8 
)

Standard authentication code (used in Direct Mail, checkJumpUrl and setfixed links computations) Usage: 2

Parameters:
mixed Uid (integer) or record (array)
string List of fields from the record if that is given.
integer Length of returned authentication code.
Returns:
string MD5 hash of 8 chars.

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

References trimExplode().

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 3543 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::hideIfNotTranslated ( l18n_cfg_fieldValue  ) 

Responds on input localization setting value whether the page it comes from should be hidden if no translation exists or not.

Parameters:
integer Value from "l18n_cfg" field of a page record
Returns:
boolean True if the page should be hidden

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

Referenced by tslib_menu::filterMenuPages(), tslib_menu::makeMenu(), tx_cms_webinfo_lang::renderL10nTable(), and tslib_fe::settingLanguage().

t3lib_div::readLLfile ( fileRef,
langKey 
)

Includes a locallang file and returns the $LOCAL_LANG array found inside.

Parameters:
string Input is a file-reference (see t3lib_div::getFileAbsFileName) which, if exists, is included. That file is expected to be a 'local_lang' file containing a $LOCAL_LANG array.
string Language key
Returns:
array Value of $LOCAL_LANG found in the included file. If that array is found it's returned. Otherwise an empty array

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

References getFileAbsFileName(), and readLLXMLfile().

Referenced by tx_rtehtmlarea_pi2::drawRTE(), tslib_pibase::pi_loadLL(), and language::readLLfile().

t3lib_div::readLLXMLfile ( fileRef,
langKey 
)

Includes a locallang-xml file and returns the $LOCAL_LANG array Works only when the frontend or backend has been initialized with a charset conversion object. See first code lines.

Parameters:
string Absolute reference to locallang-XML file
string TYPO3 language key, eg. "dk" or "de" or "default"
Returns:
array LOCAL_LANG array in return.

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

References dirname(), getFileAbsFileName(), llXmlAutoFileName(), writeFileToTypo3tempDir(), and xml2array().

Referenced by readLLfile().

t3lib_div::llXmlAutoFileName ( fileRef,
language 
)

Returns auto-filename for locallang-XML localizations.

Parameters:
string Absolute file reference to locallang-XML file. Must be inside system/global/local extension
string Language key
Returns:
string Returns the filename reference for the language unless error occured (or local mode is used) in which case it will be NULL

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

References isFirstPartOfStr(), and revExplode().

Referenced by readLLXMLfile().

t3lib_div::loadTCA ( table  ) 

Loads the $TCA (Table Configuration Array) for the $table

Requirements: 1) must be configured table (the ctrl-section configured), 2) columns must not be an array (which it is always if whole table loaded), and 3) there is a value for dynamicConfigFile (filename in typo3conf)

Note: For the frontend this loads only 'ctrl' and 'feInterface' parts. For complete TCA use $GLOBALS['TSFE']->includeTCA() instead.

Usage: 84

Parameters:
string Table name for which to load the full TCA array part into the global $TCA
Returns:
void

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

References isAbsPath().

Referenced by t3lib_extMgm::addPiFlexFormValue(), t3lib_extMgm::addPlugin(), t3lib_extMgm::addStaticFile(), t3lib_extMgm::addTCAcolumns(), t3lib_extMgm::addToAllTCAtypes(), t3lib_extMgm::addToInsertRecords(), t3lib_userAuthGroup::checkAuthMode(), t3lib_TCEmain::checkValue(), t3lib_TCEmain::copyRecord(), t3lib_TCEmain::copyRecord_raw(), t3lib_admin::countRecords(), tx_version_cm1::createDiffView(), SC_mod_user_ws_index::createDiffView(), tx_cms_layout::dataFields(), user_feAdmin::deleteFilesFromRecord(), t3lib_TCEmain::deleteRecord(), t3lib_TCEmain::deleteRecord_procFields(), local_beUserAuth::ext_printOverview(), t3lib_TCEmain::extFileFields(), t3lib_TCEmain::extFileFunctions(), t3lib_transferData::fetchRecord(), localRecordList::fieldSelectBox(), t3lib_TCEmain::fillInFieldArray(), t3lib_TCEmain::fixCopyAfterDuplFields(), SC_mod_user_ws_workspaceForms::fixTCAUserField(), t3lib_TCEmain::fixUniqueInPid(), recordList::generateList(), t3lib_refindex::generateRefIndexData(), tslib_fe::getCompressedTCarray(), t3lib_admin::getDBFields(), t3lib_TCEforms::getDefaultRecord(), t3lib_BEfunc::getExcludeFields(), t3lib_TCEmain::getExcludeListArray(), t3lib_BEfunc::getExplicitAuthFieldValues(), t3lib_admin::getFileFields(), t3lib_admin::getGroupFields(), t3lib_BEfunc::getItemLabel(), t3lib_BEfunc::getLabelFromItemlist(), t3lib_TCEforms::getListedFields(), t3lib_TCEforms::getMainFields(), SC_mod_user_ws_workspaceForms::getOwnerUser(), t3lib_TCEforms::getPaletteFields(), t3lib_BEfunc::getProcessedValue(), t3lib_fullsearch::getProcessedValueExtra(), t3lib_refindex::getRelations(), t3lib_TCEforms::getSingleField(), t3lib_TCEforms_inline::getSingleField_typeInline(), t3lib_TCEforms::getSingleHiddenField(), t3lib_TCEforms::getSoloField(), t3lib_transl8tools::getSystemLanguages(), tx_cms_layout::getTable(), localRecordList::getTable(), t3lib_BEfunc::getTCAtypes(), t3lib_BEfunc::getTCAtypeValue(), t3lib_TCEmain::getUnique(), t3lib_TCEmain::getUniqueFields(), tx_cms_layout::headerFields(), tx_rtehtmlarea_dam_browse_media::imageInsert(), tx_install::includeTCA(), SC_show_item::init(), t3lib_treeView::init(), t3lib_queryGenerator::init(), t3lib_TCEmain::localize(), t3lib_admin::lostRecords(), SC_wizard_edit::main(), tx_tstemplateinfo::main(), SC_mod_tools_config_index::main(), tx_lowlevel_cleanflexform::main_parseTreeCallBack(), SC_view_help::make_seeAlso(), localRecordList::makeControl(), SC_mod_tools_em_index::makeDetailedExtensionAnalysis(), recordList::makeFieldList(), t3lib_queryGenerator::makeFieldList(), t3lib_queryGenerator::makeOptionList(), recordList::makeSearchString(), t3lib_fullsearch::makeValueList(), t3lib_TCEmain::moveRecord_procFields(), t3lib_TCEmain::newFieldArray(), t3lib_TCEforms_inline::parseStructureString(), t3lib_TCEmain::placeholderShadowing(), SC_view_help::printItem(), user_feAdmin::processFiles(), tx_impexp::processSoftReferences(), t3lib_userAuthGroup::recordEditAccessInternals(), transferData::regItem(), t3lib_TCEmain::remapListedDBRecords(), recordHistory::removeFilefields(), SC_db_new_content_el::removeInvalidElements(), SC_view_help::render_Table(), recordHistory::renderDiff(), SC_db_layout::renderListContent(), t3lib_transferData::renderRecord(), t3lib_transferData::renderRecordRaw(), t3lib_fullsearch::search(), t3lib_admin::selectNonEmptyRecordsWithFkeys(), tx_impexp::setFlexFormRelations(), recordList::showSysNotesForPage(), tslib_feTCE::start(), t3lib_BEfunc::thumbCode(), t3lib_transl8tools::translationInfo(), tx_cms_layout::tt_content_drawHeader(), tx_version_cm1::versioningMgm(), and t3lib_admin::whereIsRecordReferenced().

t3lib_div::resolveSheetDefInDS ( dataStructArray,
sheet = 'sDEF' 
)

Looks for a sheet-definition in the input data structure array. If found it will return the data structure for the sheet given as $sheet (if found). If the sheet definition is in an external file that file is parsed and the data structure inside of that is returned. Usage: 5

Parameters:
array Input data structure, possibly with a sheet-definition and references to external data source files.
string The sheet to return, preferably.
Returns:
array An array with two num. keys: key0: The data structure is returned in this key (array) UNLESS an error happend in which case an error string is returned (string). key1: The used sheet key value!

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

References getFileAbsFileName(), and xml2array().

Referenced by t3lib_TCEmain::checkValue_flex_procInData(), t3lib_TCEforms::getSingleField_typeFlex(), t3lib_transferData::renderRecord_flexProc_procInData(), resolveAllSheetsInDS(), and t3lib_flexformtools::traverseFlexFormXMLData().

t3lib_div::resolveAllSheetsInDS ( dataStructArray  ) 

Resolves ALL sheet definitions in dataStructArray If no sheet is found, then the default "sDEF" will be created with the dataStructure inside.

Parameters:
array Input data structure, possibly with a sheet-definition and references to external data source files.
Returns:
array Output data structure with all sheets resolved as arrays.

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

References resolveSheetDefInDS().

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 3862 of file class.t3lib_div.php.

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

Referenced by t3lib_userAuthGroup::calcPerms(), tslib_fe::checkAlternativeIdMethods(), t3lib_TCEmain::clear_cache(), t3lib_TCEmain::clear_cacheCmd(), tslib_fe::connectToDB(), tslib_fe::determineId(), t3lib_pageSelect::enableFields(), t3lib_tsfeBeUserAuth::extEditAction(), t3lib_TCEforms::formatValue(), tslib_fe::generatePage_postProcessing(), t3lib_userAuthGroup::getPagePermsClause(), t3lib_BEfunc::getProcessedValue(), t3lib_fullsearch::getQueryResultCode(), t3lib_BEfunc::getRecordTitle(), t3lib_TCEforms::getSingleField_typeUser(), tslib_fe::headerNoCache(), tslib_fe::hook_eofe(), t3lib_parsehtml::HTMLcleaner(), tslib_fe::initFEuser(), tslib_fe::isOutputting(), t3lib_userAuth::logoff(), tslib_fe::pageNotFoundHandler(), t3lib_TSparser::parseSub(), tslib_fe::processOutput(), t3lib_transferData::procItems(), t3lib_TCEforms::procItems(), t3lib_TCEforms_inline::renderForeignRecordHeader(), 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::getUserObj ( classRef,
checkPrefix = 'user_',
silent = 0 
)

Creates and returns reference to a user defined object. This function can return an object reference if you like. Just prefix the function call with "&": "$objRef = &t3lib_div::getUserObj('EXT:myext/class.tx_myext_myclass.php:&tx_myext_myclass');". This will work ONLY if you prefix the class name with "&" as well. See description of function arguments. Usage: 5

Parameters:
string Class reference, '[file-reference":"]["&"]class-name'. You can prefix the class name 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". Finally; for the class name you can prefix it with "&" and you will reuse the previous instance of the object identified by the full reference string (meaning; if you ask for the same $classRef later in another place in the code you will get a reference to the first created one!).
string Required prefix of class name. By default "tx_" is allowed.
boolean If set, no debug() error message is shown if class/function is not present.
Returns:
object The instance of the class asked for. Instance is created with t3lib_div::makeInstance
See also:
callUserFunction()

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

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

Referenced by t3lib_matchCondition::__construct(), tslib_fe::checkDataSubmission(), t3lib_TCEmain::checkValue_input_Eval(), tx_lowlevel_cleaner_core::cli_main(), tx_indexedsearch_crawler::crawler_execute(), tx_indexedsearch_crawler::crawler_init(), t3lib_userAuthGroup::fetchGroups(), tslib_fe::generatePage_postProcessing(), t3lib_BEfunc::getFlexFormDS(), t3lib_TCEforms::getSingleField_typeInput(), tx_indexedsearch::hookRequest(), tx_indexedsearch_modfunc2::hookRequest(), tx_cssstyledcontent_pi1::hookRequest(), tx_indexedsearch_indexer::init(), tx_indexedsearch::initialize(), tx_indexedsearch_indexer::initializeExternalParsers(), tx_wizardcrpages_webfunc_2::main(), tx_rtehtmlarea_SC_select_image::main(), tx_lowlevel_rte_images::main(), tx_indexedsearch_modfunc1::main(), SC_show_item::main(), tx_rtehtmlarea_SC_browse_links::main(), SC_browse_links::main(), SC_alt_topmenu_dummy::main(), tx_rtehtmlarea_parse_html::main_parse_html(), t3lib_TCEmain::moveRecord(), t3lib_TCEmain::process_cmdmap(), t3lib_TCEmain::process_datamap(), tslib_fe::realPageCacheContent(), t3lib_parsehtml_proc::RTE_transform(), t3lib_BEfunc::RTEgetObj(), tslib_fe::sendFormmail(), t3lib_BEfunc::softRefParserObj(), tslib_cObj::start(), tslib_fe::statistics(), t3lib_TCEforms::t3lib_TCEforms(), tslib_cObj::typoLink(), and t3lib_matchCondition::whichDevice().

& t3lib_div::makeInstance ( className  ) 

Make instance of class Takes the class-extensions API of TYPO3 into account Please USE THIS instead of the PHP "new" keyword. Eg. "$obj = new myclass;" should be "$obj = t3lib_div::makeInstance("myclass")" instead! Usage: 447

Parameters:
string Class name to instantiate
Returns:
object A reference to the object

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

References requireOnce().

Referenced by tx_sysaction::action_t1_createUpdateBeUser(), t3lib_TCEforms::addSelectOptionsToItemArray(), wslib::autoPublishWorkspaces(), SC_wizard_tsconfig::browseTSprop(), SC_mod_user_ws_workspaceForms::buildEditForm(), SC_mod_user_ws_workspaceForms::buildNewForm(), callUserFunction(), tx_install::check_mail(), SC_mod_tools_em_index::checkClearCache(), t3lib_SCbase::checkExtObj(), t3lib_extobjbase::checkExtObj(), browse_links::checkFolder(), tslib_gifBuilder::checkTextObj(), SC_mod_tools_log_index::checkUpload(), t3lib_TCEmain::checkValue_flexArray2Xml(), t3lib_TCEmain::checkValue_group_select_file(), t3lib_TCEmain::checkValue_group_select_processDBdata(), t3lib_basicFileFunctions::cleanFileName(), t3lib_flexformtools::cleanFlexFormXML(), SC_db_layout::clearCache(), SC_db_list::clearCache(), SC_mod_web_ts_index::clearCache(), tx_lowlevel_cleaner_core::cli_referenceIndexCheck(), tslib_cObj::cObjGetSingle(), tx_impexp::compareRecords(), SC_mod_tools_be_user_index::compareUsers(), tslib_cObj::CONTENT(), t3lib_TCEmain::copyRecord(), t3lib_TCEmain::copyRecord_procBasedOnFieldType(), t3lib_TCEmain::copyRecord_procFilesRefs(), tx_indexedsearch_files::crawler_execute(), tx_indexedsearch_crawler::crawler_execute_type2(), tx_version_cm1::createDiffView(), SC_mod_user_ws_index::createDiffView(), user_feAdmin::createFileFuncObj(), SC_mod_web_ts_index::createTemplate(), tslib_cObj::CTABLE(), t3lib_TCEmain::deleteRecord(), t3lib_TCEmain::deleteRecord_flexFormCallBack(), t3lib_TCEmain::deleteRecord_procBasedOnFieldType(), tslib_fe::determineId(), tx_version_cm1::displayWorkspaceOverview(), SC_mod_user_ws_index::displayWorkspaceOverview(), tx_indexedsearch_modfunc1::drawTableOfIndexedPages(), tslib_cObj::editPanel(), tx_dbal_handler_rawmysql::exec_SELECTquery(), t3lib_sqlengine::exec_SELECTquery(), tx_rtehtmlarea_select_image::expandFolder(), tx_impexp::export_addRecord(), SC_mod_tools_log_index::exportData(), local_beUserAuth::ext_compileUserInfoForHash(), t3lib_tsStyleConfig::ext_mergeIncomingWithExisting(), local_beUserAuth::ext_printOverview(), t3lib_tsfeBeUserAuth::extEditAction(), tx_indexedsearch_indexer::extractHyperLinks(), tx_indexedsearch_indexer::extractLinks(), tslib_fe::fe_tce(), tslib_fe::fetch_the_id(), t3lib_userAuthGroup::fetchGroupData(), browse_links::fileList(), t3lib_TCEmain::fillInFieldArray(), t3lib_softrefproc::findRef_images(), t3lib_softrefproc::findRef_TStemplate(), t3lib_softrefproc::findRef_typolink_tag(), SC_mod_tools_dbint_index::func_records(), SC_mod_tools_dbint_index::func_refindex(), SC_mod_tools_dbint_index::func_relations(), SC_mod_tools_dbint_index::func_search(), SC_mod_tools_dbint_index::func_tree(), t3lib_TStemplate::generateConfig(), t3lib_tsparser_ext::generateConfig_constants(), tslib_fe::generatePage_postProcessing(), SC_wizard_table::getConfigCode(), SC_wizard_forms::getConfigCode(), SC_mod_user_ws_publish::getContent(), t3lib_transferData::getDataIdList(), t3lib_install::getFieldDefinitions_sqlContent_parseTypes(), tx_impexp::getFileProcObj(), tslib_cObj::getImgResource(), t3lib_TCEforms_inline::getJSON(), t3lib_TCEforms::getLanguageIcon(), tx_impexp::getNewTCE(), SC_mod_user_ws_workspaceForms::getOwnerUser(), t3lib_BEfunc::getPagesTSconfig(), t3lib_BEfunc::getProcessedValue(), t3lib_TCEforms_inline::getRecord(), SC_mod_user_ws_publish::getRecords(), SC_mod_web_perm_index::getRecursiveSelect(), t3lib_refindex::getRelations(), t3lib_refindex::getRelations_procDB(), t3lib_refindex::getRelations_procFiles(), tslib_gifBuilder::getResource(), tx_indexedsearch::getSearchWords(), recordList::getTreeObject(), tx_indexedsearch_modfunc1::getUidRootLineForClosestTemplate(), tx_indexedsearch_crawler::getUidRootLineForClosestTemplate(), getUserObj(), tslib_feUserAuth::getUserTSconf(), ux_t3lib_DB::handler_init(), t3lib_syntaxhl::highLight_DS(), t3lib_syntaxhl::highLight_FF(), tslib_cObj::HMENU(), tslib_cObj::HTMLparser_TSbridge(), tx_rtehtmlarea_dam_browse_media::imageInsert(), tslib_cObj::imageLinkWrap(), t3lib_stdGraphic::imageMagickConvert(), tslib_cObj::IMGTEXT(), SC_mod_tools_log_index::importData(), tx_indexedsearch_crawler::indexExtUrl(), tx_indexedsearch_crawlerhook::indexOperation(), tx_indexedsearch_crawler::indexSingleRecord(), SC_wizard_tsconfig::init(), SC_wizard_table::init(), SC_wizard_rte::init(), SC_wizard_forms::init(), SC_wizard_colorpicker::init(), SC_tce_db::init(), tx_rtehtmlarea_parse_html::init(), tx_rtehtmlarea_user::init(), tx_rtehtmlarea_select_image::init(), tx_rtehtmlarea_dam_browse_media::init(), tx_rtehtmlarea_browse_links::init(), tx_rtehtmlarea_acronym::init(), language::init(), tx_indexedsearch_indexer::init(), tx_dbal_handler_openoffice::init(), SC_db_new_content_el::init(), SC_show_rechis::init(), SC_show_item::init(), SC_move_el::init(), SC_mod_user_ws_workspaceForms::init(), SC_mod_user_ws_publish::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(), browse_links::init(), SC_browse_links::init(), SC_alt_shortcut::init(), SC_alt_palette::init(), SC_alt_menu::init(), SC_alt_main::init(), SC_alt_intro::init(), SC_alt_file_navframe::init(), SC_alt_doc_nodoc::init(), SC_alt_doc_ajax::init(), SC_alt_doc::init(), SC_alt_db_navframe::init(), SC_alt_clickmenu::init(), t3lib_stdGraphic::init(), SC_mod_user_setup_index::init(), SC_mod_tools_dbint_index::init(), SC_mod_tools_config_index::init(), SC_mod_tools_isearch_index::init(), SC_mod_tools_be_user_index::init(), SC_mod_tools_log_index::init(), SC_mod_web_perm_index::init(), SC_mod_user_ws_index::init(), SC_tce_file::initClipboard(), SC_tce_db::initClipboard(), tslib_fe::initFEuser(), tx_tstemplateobjbrowser::initialize_editor(), tx_tstemplateinfo::initialize_editor(), tx_tstemplateceditor::initialize_editor(), tx_tstemplateanalyzer::initialize_editor(), t3lib_recordList::initializeLanguages(), SC_mod_user_ws_workspaceForms::initTCEForms(), tslib_fe::initTemplate(), SC_mod_tools_be_user_index::initUsers(), tx_sysaction::JScode(), t3lib_TCEmain::localize(), tx_rtehtmlarea_select_image::magicProcess(), SC_wizard_rte::main(), SC_wizard_edit::main(), SC_wizard_add::main(), SC_tce_file::main(), tx_wizardsortpages_webfunc_2::main(), tx_wizardcrpages_webfunc_2::main(), tx_tstemplateobjbrowser::main(), tx_tstemplateinfo::main(), tx_tstemplateceditor::main(), tx_rtehtmlarea_SC_select_image::main(), tx_infopagetsconfig_webinfo::main(), tx_indexedsearch::main(), tx_indexedsearch_modfunc1::main(), tx_cms_webinfo_lang::main(), tx_cms_webinfo_page::main(), SC_db_new_content_el::main(), SC_db_layout::main(), tx_belog_webinfo::main(), SC_show_rechis::main(), SC_move_el::main(), SC_file_list::main(), SC_db_list::main(), tx_rtehtmlarea_SC_browse_links::main(), SC_browse_links::main(), SC_alt_topmenu_dummy::main(), SC_alt_menu_sel::main(), SC_alt_menu::main(), SC_alt_intro::main(), SC_alt_doc_nodoc::main(), SC_alt_doc::main(), SC_alt_clickmenu::main(), tx_version_cm1::main(), SC_mod_web_ts_index::main(), SC_mod_user_task_index::main(), SC_mod_user_setup_index::main(), SC_mod_tools_config_index::main(), SC_mod_tools_log_index::main(), tx_dbal_module1::main(), SC_mod_web_info_index::main(), SC_mod_web_func_index::main(), tx_lowlevel_versions::main_autoFix(), tx_lowlevel_orphan_records::main_autoFix(), tx_lowlevel_missing_relations::main_autoFix(), tx_lowlevel_missing_files::main_autoFix(), tx_lowlevel_double_files::main_autoFix(), tx_lowlevel_deleted::main_autoFix(), tx_lowlevel_cleanflexform::main_autoFix(), browse_links::main_db(), browse_links::main_file(), tx_rtehtmlarea_parse_html::main_parse_html(), tx_lowlevel_cleanflexform::main_parseTreeCallBack(), tx_rtehtmlarea_select_image::main_rte(), tx_rtehtmlarea_dam_browse_media::main_rte(), tx_rtehtmlarea_browse_links::main_rte(), browse_links::main_rte(), tslib_frameset::make(), SC_alt_doc::makeEditForm(), tslib_imgmenu::makeImageMap(), makeInstanceService(), localRecordList::makeLocalizationPanel(), tslib_menu::makeMenu(), t3lib_TStemplate::matching(), t3lib_TStemplate::mergeConstantsFromPageTSconfig(), tslib_cObj::mergeTSRef(), tx_lowlevel_cleaner::moduleContent(), t3lib_TCEmain::moveRecord_procBasedOnFieldType(), tslib_fe::newCObj(), SC_mod_web_perm_index::notEdit(), SC_mod_web_ts_index::noTemplate(), tslib_cObj::OTABLE(), SC_db_new::pagesOnly(), tslib_cObj::parseFunc(), recordHistory::performRollback(), tslib_pibase::pi_getEditPanel(), t3lib_positionMap::positionTree(), SC_alt_shortcut::preinit(), t3lib_TCEmain::printLogErrorMessages(), t3lib_extFileFunctions::printLogErrorMessages(), t3lib_TCEmain::process_datamap(), SC_mod_user_ws_workspaceForms::processData(), SC_alt_doc::processData(), clickMenu::processingByExtClassArray(), tslib_fe::processOutput(), tx_indexedsearch_modfunc1::processPageKeywords(), tx_impexp::processSoftReferences(), tx_version_cm1::publishAction(), t3lib_fullsearch::queryMaker(), tslib_cObj::RECORDS(), t3lib_TCEforms::registerDefaultLanguageData(), tx_indexedsearch_modfunc1::reindexPhash(), t3lib_TCEmain::remapListedDBRecords_procDBRefs(), t3lib_TCEmain::remapListedDBRecords_procInline(), tx_cssstyledcontent_pi1::render_textpic(), SC_view_help::render_TOC(), tx_sysaction::renderActions(), TSpagegen::renderContentWithHeader(), t3lib_TCEforms::renderDefaultLanguageDiff(), recordHistory::renderDiff(), SC_show_item::renderFileInfo(), SC_db_layout::renderListContent(), SC_db_layout::renderQuickEdit(), t3lib_transferData::renderRecord_flexProc(), t3lib_transferData::renderRecord_groupProc(), t3lib_transferData::renderRecord_typesProc(), tx_tstemplateinfo::resourceListForCopy(), t3lib_fullsearch::resultRowDisplay(), t3lib_fullsearch::saveQueryInAction(), tslib_cObj::SEARCHRESULT(), t3lib_transferData::selectAddSpecial(), t3lib_admin::selectNonEmptyRecordsWithFkeys(), mod_user_task::sendEmail(), tslib_fe::sendFormmail(), user_feAdmin::sendHTMLMail(), user_feAdmin::setCObjects(), tx_impexp::setFlexFormRelations(), t3lib_refindex::setReferenceValue(), t3lib_refindex::setReferenceValue_dbRels(), t3lib_refindex::setReferenceValue_fileRels(), t3lib_refindex::setReferenceValue_softreferences(), SC_mod_user_setup_index::simulateUser(), tx_dbal_handler_rawmysql::sql_query(), t3lib_sqlengine::sql_query(), tslib_gifBuilder::start(), tslib_cObj::stdWrap(), SC_mod_user_setup_index::storeIncomingData(), tx_version_cm1::subElements(), SC_mod_user_ws_index::subElements(), tslib_menu::subMenu(), SC_view_help::substituteGlossaryWords(), t3lib_TCEforms::t3lib_TCEforms(), tslib_cObj::TEMPLATE(), SC_mod_web_ts_index::templateMenu(), t3lib_rteapi::transformContent(), t3lib_parsehtml_proc::TS_images_db(), tslib_fe::tslib_fe(), SC_mod_tools_em_index::tsStyleConfigForm(), tx_indexedsearch_lexer::tx_indexedsearch_lexer(), t3lib_refindex::updateIndex(), tx_lowlevel_cleaner::updateRefIndex(), t3lib_TCEmain::updateRefIndex(), t3lib_loadDBGroup::updateRefIndex(), t3lib_tsparser_ext::upload_copy_file(), SC_mod_tools_em_terconnection::uploadToTER(), ux_t3lib_DB::ux_t3lib_DB(), tx_version_cm1::versioningMgm(), t3lib_admin::whereIsRecordReferenced(), SC_db_new_content_el::wizardArray(), t3lib_refindex::wordIndexing(), and tslib_tmenu::writeMenu().

t3lib_div::makeInstanceClassName ( className  ) 

Return classname for new instance Takes the class-extensions API of TYPO3 into account Usage: 17

Parameters:
string Base Class name to evaluate
Returns:
string Final class name to instantiate with "new [classname]"

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

Referenced by tslib_cObj::callUserFunction(), local_beUserAuth::ext_getReadableButNonmounted(), local_beUserAuth::ext_printOverview(), t3lib_fullsearch::getQueryResultCode(), tslib_eidtools::initFeUser(), user_wapversion::main_wapversion(), user_xmlversion::main_xmlversion(), and user_feAdmin::sendHTMLMail().

& t3lib_div::makeInstanceService ( serviceType,
serviceSubType = '',
excludeServiceKeys = array() 
)

Find the best service and check if it works. Returns object of the service class.

Parameters:
string Type of service (service key).
string Sub type like file extensions or similar. Defined by the service.
mixed List of service keys which should be exluded in the search for a service. Array or comma list.
Returns:
object The service object or an array with error info's.
Author:
René Fritz <r.fritz@colorcube.de>

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

References t3lib_extMgm::deactivateService(), t3lib_extMgm::findService(), getFileAbsFileName(), makeInstance(), requireOnce(), trimExplode(), and view_array().

Referenced by t3lib_userAuth::checkAuthentication(), and tslib_feUserAuth::fetchGroupData().

t3lib_div::requireOnce ( requireFile  ) 

Require a class for TYPO3 Useful to require classes from inside other classes (not global scope). A limited set of global variables are available (see function)

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

Referenced by callUserFunction(), getUserObj(), makeInstance(), and makeInstanceService().

t3lib_div::plainMailEncoded ( email,
subject,
message,
headers = '',
encoding = 'quoted-printable',
charset = '',
dontEncodeHeader = false 
)

Simple substitute for the PHP function mail() which allows you to specify encoding and character set The fifth parameter ($encoding) will allow you to specify 'base64' encryption for the output (set $encoding=base64) Further the output has the charset set to ISO-8859-1 by default. Usage: 4

Parameters:
string Email address to send to. (see PHP function mail())
string Subject line, non-encoded. (see PHP function mail())
string Message content, non-encoded. (see PHP function mail())
string Headers, separated by chr(10)
string Encoding type: "base64", "quoted-printable", "8bit". Default value is "quoted-printable".
string Charset used in encoding-headers (only if $encoding is set to a valid value which produces such a header)
boolean If set, the header content will not be encoded.
Returns:
void

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

References encodeHeader(), quoted_printable(), and trimExplode().

Referenced by tx_install::check_mail(), and t3lib_TCEmain::notifyStageChange().

t3lib_div::quoted_printable ( string,
maxlen = 76 
)

Implementation of quoted-printable encode. This functions is buggy. It seems that in the part where the lines are breaked every 76th character, that it fails if the break happens right in a quoted_printable encode character! See RFC 1521, section 5.1 Quoted-Printable Content-Transfer-Encoding Usage: 2

Parameters:
string Content to encode
integer Length of the lines, default is 76
Returns:
string The QP encoded string

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

Referenced by encodeHeader(), t3lib_htmlmail::encodeMsg(), plainMailEncoded(), and t3lib_htmlmail::quoted_printable().

t3lib_div::encodeHeader ( line,
enc = 'quoted-printable',
charset = 'ISO-8859-1' 
)

Encode header lines Email headers must be ASCII, therefore they will be encoded to quoted_printable (default) or base64.

Parameters:
string Content to encode
string Encoding type: "base64" or "quoted-printable". Default value is "quoted-printable".
string Charset used for encoding
Returns:
string The encoded string

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

References quoted_printable().

Referenced by t3lib_htmlmail::add_header(), plainMailEncoded(), and t3lib_htmlmail::setHeaders().

t3lib_div::substUrlsInPlainText ( message,
urlmode = '76',
index_script_url = '' 
)

Takes a clear-text message body for a plain text email, finds all 'http://' links and if they are longer than 76 chars they are converted to a shorter URL with a hash parameter. The real parameter is stored in the database and the hash-parameter/URL will be redirected to the real parameter when the link is clicked. This function is about preserving long links in messages. Usage: 3

Parameters:
string Message content
string URL mode; "76" or "all"
string URL of index script (see makeRedirectUrl())
Returns:
string Processed message content
See also:
makeRedirectUrl()

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

t3lib_div::makeRedirectUrl ( inUrl,
l = 0,
index_script_url = '' 
)

Subfunction for substUrlsInPlainText() above. Usage: 2

Parameters:
string Input URL
integer URL string length limit
string URL of "index script" - the prefix of the "?RDCT=..." parameter. If not supplyed it will default to t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR').'index.php'
Returns:
string Processed URL

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

t3lib_div::freetypeDpiComp ( font_size  ) 

Function to compensate for FreeType2 96 dpi Usage: 21

Parameters:
integer Fontsize for freetype function call
Returns:
integer Compensated fontsize based on $GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi']

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

Referenced by t3lib_stdGraphic::ImageTTFBBoxWrapper(), t3lib_stdGraphic::ImageTTFTextWrapper(), and tx_install::isTTF().

t3lib_div::initSysLog (  ) 

Init system error log.

Returns:
void
See also:
sysLog()

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

t3lib_div::sysLog ( msg,
extKey,
severity = 0 
)

System error log; This should be implemented around the source code, including the Core and both frontend and backend, logging serious errors. If you want to implement the sysLog in your applications, simply add lines like: t3lib_div::sysLog('[write message in English here]', 'extension key');

Parameters:
string Message (in English).
string Extension key (from which extension you are calling the log) or "Core"
integer Severity: 0 is info, 1 is notice, 2 is warning, 3 is error, 4 is fatal error
Returns:
void

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

Referenced by t3lib_DB::debug_check_recordset(), ux_t3lib_DB::handler_init(), SC_mod_tools_em_index::importExtFromRep(), t3lib_TSparser::parseSub(), t3lib_DB::sql_pconnect(), t3lib_DB::sql_select_db(), t3lib_userAuth::start(), t3lib_formmail::start(), and t3lib_install::writeToLocalconf_control().

t3lib_div::devLog ( msg,
extKey,
severity = 0,
dataVar = FALSE 
)

Developer log; This should be implemented around the source code, both frontend and backend, logging everything from the flow through an application, messages, results from comparisons to fatal errors. The result is meant to make sense to developers during development or debugging of a site. The idea is that this function is only a wrapper for external extensions which can set a hook which will be allowed to handle the logging of the information to any format they might wish and with any kind of filter they would like. If you want to implement the devLog in your applications, simply add lines like: if (TYPO3_DLOG) t3lib_div::devLog('[write message in english here]', 'extension key');

Parameters:
string Message (in english).
string Extension key (from which extension you are calling the log)
integer Severity: 0 is info, 1 is notice, 2 is warning, 3 is fatal error, -1 is "OK" message
array Additional data you want to pass to the logger.
Returns:
void

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

Referenced by t3lib_modSettings::addToStoreList(), t3lib_modSettings::addToStoreListFromPrefix(), tx_sv_auth::authUser(), t3lib_userAuth::checkAuthentication(), t3lib_userAuth::compareUident(), t3lib_userAuth::createUserSession(), t3lib_DB::debug_check_recordset(), t3lib_svbase::devLog(), template::endPage(), tslib_feUserAuth::fetchGroupData(), t3lib_userAuth::fetchUserSession(), tx_sv_auth::getGroups(), tx_sv_auth::getUser(), tslib_fe::initUserGroups(), t3lib_userAuth::logoff(), t3lib_modSettings::processStoreControl(), t3lib_userAuth::setAndSaveSessionData(), t3lib_modSettings::setStoreList(), t3lib_userAuth::start(), t3lib_formmail::start(), t3lib_modSettings::writeStoredSetting(), and t3lib_userAuth::writeUC().

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 4517 of file class.t3lib_div.php.

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

t3lib_div::imageMagickCommand ( command,
parameters,
path = '' 
)

Compile the command for running ImageMagick/GraphicsMagick.

Parameters:
string Command to be run: identify, convert or combine/composite
string The parameters string
string Override the default path
Returns:
string Compiled command that deals with IM6 & GraphicsMagick

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

Referenced by t3lib_stdGraphic::combineExec(), gif_compress(), t3lib_iconWorks::imagecopyresized(), t3lib_stdGraphic::imageMagickExec(), t3lib_stdGraphic::imageMagickIdentify(), and png_to_gif_by_imagemagick().

t3lib_div::unQuoteFilenames ( parameters,
unQuote = FALSE 
)

Explode a string (normally a list of filenames) with whitespaces by considering quotes in that string. This is mostly needed by the imageMagickCommand function above.

Parameters:
string The whole parameters string
boolean If set, the elements of the resulting array are unquoted.
Returns:
array Exploded parameters

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

Referenced by t3lib_parsehtml_proc::TS_links_rte(), and tslib_cObj::typoLink().

t3lib_div::quoteJSvalue ( value,
inScriptTags = false 
)

Quotes a string for usage as JS parameter. Depends wheter the value is used in script tags (it doesn't need/must not get htmlspecialchar'ed in this case)

Parameters:
string The string to encode.
boolean If the values get's used in <script> tags.
Returns:
string The encoded value already quoted

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

Referenced by browse_links::fileList(), tslib_cObj::getUpdateJS(), tx_rtehtmlarea_dam_browse_media::imageInsertJS(), TBE_browser_recordList::linkWrapItems(), and TBE_PageTree::wrapTitle().


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


Généré par L'expert TYPO3 avec  doxygen 1.4.6