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)
 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)
 md5int ($str)
 shortMD5 ($input, $len=10)
 uniqueList ($in_list, $secondParameter=NULL)
 split_fileref ($fileref)
 dirname ($path)
 modifyHTMLColor ($color, $R, $G, $B)
 modifyHTMLColorAll ($color, $all)
 rm_endcomma ($string)
 danish_strtoupper ($string)
 convUmlauts ($str)
 testInt ($var)
 isFirstPartOfStr ($str, $partStr)
 formatSize ($sizeInBytes, $labels='')
 convertMicrotime ($microtime)
 splitCalc ($string, $operators)
 calcPriority ($string)
 calcParenthesis ($string)
 htmlspecialchars_decode ($value)
 deHSCentities ($str)
 slashJS ($string, $extended=0, $char="'")
 rawUrlEncodeJS ($str)
 rawUrlEncodeFP ($str)
 validEmail ($email)
 formatForTextarea ($content)
 inArray ($in_array, $item)
 intExplode ($delim, $string)
 revExplode ($delim, $string, $count=0)
 trimExplode ($delim, $string, $onlyNonEmptyValues=0)
 uniqueArray ($valueArray)
 removeArrayEntryByValue ($array, $cmpValue)
 implodeArrayForUrl ($name, $theArray, $str='', $skipBlank=0, $rawurlencodeParamName=0)
 explodeUrl2Array ($string, $multidim=FALSE)
 compileSelectedGetVarsFromArray ($varList, $getArray, $GPvarAlt=1)
 addSlashesOnArray (&$theArray)
 stripSlashesOnArray (&$theArray)
 slashArray ($arr, $cmd)
 array_merge_recursive_overrule ($arr0, $arr1, $notAddKeys=0, $includeEmtpyValues=true)
 array_merge ($arr1, $arr2)
 csvValues ($row, $delim=',', $quote='"')
 get_tag_attributes ($tag)
 split_tag_attributes ($tag)
 implodeAttributes ($arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE)
 implodeParams ($arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE)
 wrapJS ($string, $linebreak=TRUE)
 xml2tree ($string, $depth=999)
 array2xml ($array, $NSprefix='', $level=0, $docTag='phparray', $spaceInd=0, $options=array(), $stackData=array())
 xml2array ($string, $NSprefix='', $reportDocTag=FALSE)
 xmlRecompileFromStructValArray ($vals)
 xmlGetHeaderAttribs ($xmlData)
 getURL ($url)
 writeFile ($file, $content)
 fixPermissions ($file)
 writeFileToTypo3tempDir ($filepath, $content)
 mkdir ($theNewFolder)
 get_dirs ($path)
 getFilesInDir ($path, $extensionList='', $prependPath=0, $order='')
 getAllFilesAndFoldersInPath ($fileArr, $path, $extList='', $regDirs=0, $recursivityLevels=99)
 removePrefixPathFromList ($fileArr, $prefixToRemove)
 fixWindowsFilePath ($theFile)
 resolveBackPath ($pathStr)
 locationHeaderUrl ($path)
 debug_ordvalue ($string, $characters=100)
 view_array ($array_in)
 print_array ($array_in)
 debug ($var="", $brOrHeader=0)
 getThisUrl ()
 linkThisScript ($getParams=array())
 linkThisUrl ($url, $getParams=array())
 getIndpEnv ($getEnvName)
 milliseconds ()
 clientInfo ($useragent='')
 getFileAbsFileName ($filename, $onlyRelative=1, $relToTYPO3_mainDir=0)
 validPathStr ($theFile)
 isAbsPath ($path)
 isAllowedAbsPath ($path)
 verifyFilenameAgainstDenyPattern ($filename)
 upload_copy_move ($source, $destination)
 upload_to_tempfile ($uploadedFileName)
 unlink_tempfile ($uploadedTempFileName)
 tempnam ($filePrefix)
 stdAuthCode ($uid_or_record, $fields='')
 cHashParams ($addQueryParams)
 hideIfNotTranslated ($l18n_cfg_fieldValue)
 readLLfile ($fileRef, $langKey)
 readLLXMLfile ($fileRef, $langKey)
 loadTCA ($table)
 resolveSheetDefInDS ($dataStructArray, $sheet='sDEF')
 resolveAllSheetsInDS ($dataStructArray)
 callUserFunction ($funcName, &$params, &$ref, $checkPrefix='user_', $silent=0)
getUserObj ($classRef, $checkPrefix='user_', $silent=0)
makeInstance ($className)
 makeInstanceClassName ($className)
makeInstanceService ($serviceType, $serviceSubType='', $excludeServiceKeys=array())
 plainMailEncoded ($email, $subject, $message, $headers='', $enc='', $charset='ISO-8859-1', $dontEncodeSubject=0)
 quoted_printable ($string, $maxlen=76)
 substUrlsInPlainText ($message, $urlmode='76', $index_script_url='')
 makeRedirectUrl ($inUrl, $l=0, $index_script_url='')
 freetypeDpiComp ($font_size)
 devLog ($msg, $extKey, $severity=0, $dataVar=FALSE)
 arrayToLogString ($arr, $valueList=array(), $valueLength=20)
 imageMagickCommand ($command, $parameters, $path='')
 unQuoteFilenames ($parameters)

Detailed Description

Definition at line 10 of file incfile.php.


Member Function Documentation

t3lib_div::_GET var = NULL  ) 
 

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

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

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

References stripSlashesOnArray().

Referenced by SC_alt_main::editPageHandling(), SC_mod_tools_dbint_index::func_records(), SC_show_item::init(), linkThisScript(), SC_file_list::main(), tx_tstemplatestyler_modfunc1::main(), tx_tstemplateobjbrowser::main(), tx_tstemplateanalyzer::main(), SC_db_list::main(), SC_alt_clickmenu::main(), SC_mod_tools_config_index::main(), tx_ttproducts::main_products(), tslib_fe::makeCacheHash(), template::makeShortcutUrl(), tslib_fe::mergingWithGetVars(), SC_alt_doc::preInit(), t3lib_TStemplate::processTemplate(), SC_db_layout::renderQuickEdit(), and t3lib_userAuth::start().

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

References addSlashesOnArray().

Referenced by tslib_fe::mergingWithGetVars(), and SC_rte_select_image::preinit().

t3lib_div::_GP var  ) 
 

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

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

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

References stripSlashesOnArray().

Referenced by tx_taskcenterrecent::_renderRecent(), tx_sysaction::action_t1_createUpdateBeUser(), SC_mod_tools_em_index::checkDBupdates(), t3lib_SCbase::checkExtObj(), tslib_fe::checkJumpUrl(), tx_install::checkPassword(), tx_install::checkTheDatabase(), SC_mod_tools_log_index::checkUpload(), t3lib_TCEmain::checkValue_flex(), tx_kickstarter_section_fields::cleanFieldsAndDoCommands(), SC_mod_web_ts_index::clearCache(), mod_web_dmail::cmd_default(), mod_web_dmail::cmd_displayImport(), mod_web_dmail::cmd_displayMailGroup(), mod_web_dmail::cmd_displayUserInfo(), mod_web_dmail::cmd_quickmail(), mod_web_dmail::cmd_send_mail(), mod_web_dmail::cmd_stats(), SC_mod_tools_be_user_index::compareUsers(), mod_web_dmail::createDMail(), SC_mod_web_ts_index::createTemplate(), tslib_fe::determineId(), user_feAdmin::displayCreateScreen(), user_feAdmin::displayEditForm(), freesite_admin::displayExample(), tslib_cObj::editIcons(), tslib_cObj::editPanel(), tslib_cObj::editPanelLinkWrap(), SC_rte_select_image::expandFolder(), localPageTree::ext_tree(), t3lib_tsfeBeUserAuth::extGetCategory_edit(), tslib_menu::filterMenuPages(), tx_ttboard::forum_forum(), SC_mod_tools_dbint_index::func_filesearch(), tx_install::generateConfigForm(), tslib_cObj::getData(), tslib_cObj::getFieldDefaultValue(), t3lib_matchCondition::getGP_ENV_TSFE(), tx_ttproducts::getLinkUrl(), tx_ttnews::getLinkUrl(), t3lib_userAuth::getLoginFormData(), t3lib_fullsearch::getQueryResultCode(), tx_ttnews::getSelectConf(), t3lib_TCEforms::getSingleField_typeFlex(), tx_ttproducts::getTrackingInformation(), t3lib_extobjbase::handleExternalFunctionValue(), SC_wizard_tsconfig::init(), SC_wizard_table::init(), SC_wizard_rte::init(), SC_wizard_list::init(), SC_wizard_forms::init(), SC_wizard_edit::init(), SC_wizard_colorpicker::init(), SC_wizard_add::init(), SC_view_help::init(), SC_tce_file::init(), SC_tce_db::init(), SC_db_new_content_el::init(), SC_db_layout::init(), SC_move_el::init(), SC_file_upload::init(), SC_file_rename::init(), SC_file_newfolder::init(), SC_file_list::init(), SC_file_edit::init(), SC_rte_user::init(), SC_rte_rte::init(), SC_db_new::init(), SC_db_list::init(), SC_browse_links::init(), SC_alt_palette::init(), SC_alt_menu::init(), SC_alt_file_navframe::init(), SC_alt_doc::init(), SC_alt_db_navframe::init(), SC_alt_clickmenu::init(), clickMenu::init(), user_feAdmin::init(), SC_t3lib_thumbs::init(), t3lib_SCbase::init(), SC_tslib_showpic::init(), SC_mod_web_view_index::init(), SC_mod_tools_be_user_index::init(), SC_mod_web_perm_index::init(), SC_mod_tools_em_index::init(), SC_index::init(), SC_mod_web_ts_index::init(), SC_mod_web_modules_index::init(), SC_mod_file_images_index::init(), tslib_fe::initFEuser(), t3lib_treeView::initializePositionSaving(), t3lib_folderTree::initializePositionSaving(), tx_install::isTTF(), tslib_fe::jumpUrl(), tx_install::loginForm(), SC_logout::logout(), SC_rte_select_image::magicProcess(), mod_web_dmail::mailModule_main(), SC_wizard_colorpicker::main(), tx_wizardsortpages_webfunc_2::main(), tx_wizardcrpages_webfunc_2::main(), tx_indexedsearch_modfunc1::main(), tx_impexp_modfunc1::main(), tx_impexp_clickmenu::main(), tx_extrapagecmoptions::main(), SC_show_item::main(), tx_tstemplatestyler_modfunc1::main(), tx_tstemplateobjbrowser::main(), tx_tstemplateinfo::main(), tx_tstemplateceditor::main(), SC_rte_select_image::main(), tx_cmsplaintextimport_webfunc::main(), SC_browser::main(), SC_alt_mod_frameset::main(), tx_version_cm1::main(), SC_mod_tools_config_index::main(), SC_mod_tools_log_index::main(), SC_mod_tools_be_user_index::main(), SC_mod_web_modules_index::main(), tx_ttboard::main_board(), SC_browse_links::main_file(), tx_ttnews::main_news(), SC_rte_user::main_user(), SC_db_layout::menuConfig(), SC_file_list::menuConfig(), SC_db_list::menuConfig(), t3lib_SCbase::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_tools_em_index::menuConfig(), SC_mod_web_modules_index::menuConfig(), tx_ttnews::news_list(), user_feAdmin::parseValues(), SC_rte_select_image::preinit(), SC_alt_shortcut::preinit(), SC_alt_doc::preInit(), freesite_admin::printSelect(), SC_alt_doc::processData(), user_feAdmin::procesSetFixed(), SC_mod_tools_log_index::processPresets(), t3lib_modSettings::processStoreControl(), t3lib_fullsearch::procesStoreControl(), tx_ttproducts::products_basket(), tx_ttproducts::products_display(), tx_ttproducts::products_tracking(), recordHistory::recordHistory(), template::redirectUrls(), tx_sysaction::renderActions(), tx_sysmessages::renderMessages(), tx_sysnotepad::renderNote(), tx_systodos::renderTasks(), t3lib_fullsearch::search(), tslib_cObj::SEARCHRESULT(), user_feAdmin::sendInfoMail(), tx_ttproducts::shopAdmin(), SC_mod_tools_em_index::showExtDetails(), SC_mod_user_setup_index::simulateUser(), recordList::start(), tslib_fe::statistics(), SC_mod_user_setup_index::storeIncomingData(), SC_browse_links::TBE_dragNDrop(), SC_mod_web_ts_index::templateMenu(), tx_tipafriend::tipform(), tx_systodos::todos_createForm(), tx_systodos::todos_processIncoming(), alt_menu_functions::topMenu(), SC_mod_tools_em_index::tsStyleConfigForm(), tx_install::tx_install(), and mod_web_dmail::updatePageTS().

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

References stripSlashesOnArray().

Referenced by SC_mod_tools_em_index::checkClearCache(), SC_mod_tools_em_index::checkUploadFolder(), SC_wizard_colorpicker::colorImage(), tslib_cObj::editPanel(), freesite_admin::enteringData(), t3lib_tsfeBeUserAuth::extInitFeAdmin(), t3lib_tsfeBeUserAuth::extSaveFeAdminConfig(), tslib_fe::fe_tce(), t3lib_userAuth::getLoginFormData(), SC_mod_tools_log_index::importData(), freesite_admin::isReady(), tx_indexedsearch_modfunc1::main(), SC_file_list::main(), tx_tstemplateobjbrowser::main(), tx_tstemplateinfo::main(), tx_tstemplateceditor::main(), freesite_admin::main(), SC_db_list::main(), SC_mod_tools_config_index::main(), tx_ttpoll::main_poll(), tx_version_cm1::moduleContent(), t3lib_queryGenerator::procesData(), tslib_cObj::SEARCHRESULT(), tslib_fe::sendFormmail(), SC_mod_tools_em_index::showExtDetails(), SC_mod_user_setup_index::storeIncomingData(), SC_mod_tools_em_index::tsStyleConfigForm(), and tx_kickstarter_wizard::tx_kickstarter_wizard().

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

Referenced by _GETset().

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

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. However using MSIE to read the XML output didn't always go well: One reason could be that the character encoding is not observed in the PHP data. The other reason may be if the tag-names are invalid in the eyes of MSIE. Also using the namespace feature will make MSIE break parsing. There might be more reasons... Usage: 5

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

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

Referenced by t3lib_TCEmain::checkValue_flexArray2Xml(), SC_wizard_table::getConfigCode(), SC_wizard_forms::getConfigCode(), and t3lib_transferData::renderRecord_flexProc().

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

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

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

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

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

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

Referenced by t3lib_TCEmain::checkValue_flex(), mod_web_dmail::cmd_compileMailGroup(), t3lib_tsStyleConfig::ext_mergeIncomingWithExisting(), t3lib_TCEmain::fillInFieldArray(), t3lib_BEfunc::getModTSconfig(), t3lib_TCEmain::getTableEntries(), t3lib_BEfunc::getTCEFORM_TSconfig(), GParrayMerged(), t3lib_extobjbase::incLocalLang(), language::includeLLFile(), mailSelect::initUserDef(), tx_kickstarter_wizard::initWizArray(), linkThisUrl(), tx_belog_webinfo::localLang(), SC_rte_user::main_user(), tslib_fe::mergingWithGetVars(), mod_web_dmail::mod_web_dmail(), tslib_pibase::pi_linkTP_keepPIvars(), tslib_pibase::pi_setPiVarDefaults(), t3lib_TCEmain::process_cmdmap(), t3lib_BEfunc::RTEsetup(), language::sL(), and t3lib_pageSelect::versionOL().

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

References fixed_lgd().

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

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

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

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

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

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

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

Breaks up the text for emails Usage: 1

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

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

References array_merge(), and breakLinesForEmail().

Referenced by mod_web_dmail::cmd_quickmail().

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

References calcPriority().

Referenced by tslib_cObj::stdWrap().

t3lib_div::calcPriority string  ) 
 

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

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

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

Referenced by calcParenthesis().

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

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

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

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

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

Referenced by t3lib_userAuthGroup::calcPerms(), tslib_fe::checkAlternativeIdMethods(), t3lib_TCEmain::clear_cache(), tslib_fe::connectToDB(), tslib_fe::determineId(), devLog(), t3lib_pageSelect::enableFields(), t3lib_tsfeBeUserAuth::extEditAction(), tslib_fe::generatePage_postProcessing(), t3lib_userAuthGroup::getPagePermsClause(), 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(), tx_kickstarter_sectionbase::process_hook(), tslib_fe::processOutput(), t3lib_transferData::procItems(), t3lib_TCEforms::procItems(), tx_kickstarter_section_tsconfig::render_wizard(), tx_kickstarter_section_ts::render_wizard(), tx_kickstarter_section_tables::render_wizard(), tx_kickstarter_section_sv::render_wizard(), tx_kickstarter_section_pi::render_wizard(), tx_kickstarter_section_modulefunction::render_wizard(), tx_kickstarter_section_module::render_wizard(), tx_kickstarter_section_languages::render_wizard(), tx_kickstarter_section_fields::render_wizard(), tx_kickstarter_section_emconf::render_wizard(), t3lib_TCEforms::renderWizards(), tx_kickstarter_wizard::sidemenu(), tslib_gifBuilder::start(), t3lib_userAuth::start(), tslib_fe::tslib_fe(), and SC_mod_tools_em_index::tsStyleConfigForm().

t3lib_div::cHashParams addQueryParams  ) 
 

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

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

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

References inList().

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

t3lib_div::clientInfo useragent = ''  ) 
 

Client Browser Information Usage: 4

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

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

References getIndpEnv().

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

t3lib_div::cmpFQDN baseIP,
list
 

Match fully qualified domain name with list of strings with wildcard

Parameters:
string $baseIP is the current remote IP address for instance, typ. REMOTE_ADDR
string $list is 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 630 of file class.t3lib_div.php.

References trimExplode().

Referenced by t3lib_matchCondition::match().

t3lib_div::cmpIP baseIP,
list
 

Match IP number with list of numbers with wildcard 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)
Returns:
boolean True if an IP-mask from $list matches $baseIP

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

References trimExplode().

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

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

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

t3lib_div::convertMicrotime microtime  ) 
 

Returns microtime input to milliseconds Usage: 2

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

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

Referenced by tx_install::checkTheImageProcessing().

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. (DEPRECIATED: Works only for western europe single-byte charsets! Use t3lib_cs::specCharsToASCII() instead!)

ä => ae, Ö => Oe

Parameters:
string String to convert.
Returns:
string

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

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

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

Parameters:
array Input array of values
string Delimited, default is comman
string Quote-character to wrap around the values.
Returns:
string A single line of CSV

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

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

t3lib_div::danish_strtoupper string  ) 
 

strtoupper which converts danish (and other characters) characters as well (DEPRECIATED, use t3lib_cs::conv_case() instead or for HTML output, wrap your content in ...) Usage: 0

Parameters:
string String to process
Returns:
string

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

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

References testInt().

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

t3lib_div::deHSCentities str  ) 
 

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

Parameters:
string String which contains eg. "&" which should stay "&". Or "Ӓ" to "Ӓ". Or "" to ""
Returns:
string Converted result.

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

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

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

References callUserFunction().

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

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

References revExplode().

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 $list 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 688 of file class.t3lib_div.php.

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

Referenced by SC_db_new_content_el::removeInvalidElements().

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 '...'. DEPRECIATED. Works ONLY for single-byte charsets! USE t3lib_div::fixed_lgd_cs() instead Usage: 39

Parameters:
string $string string to truncate
integer $chars 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
See also:
fixed_lgd_pre()

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

Referenced by arrayToLogString(), user_wapversion::cBodytext(), tx_install::checkTheDatabase(), mod_web_dmail::cmd_default(), mod_web_dmail::cmd_displayPageInfo(), user_wapversion::contentAbstract(), mod_web_dmail::directMail_defaultView(), tx_indexedsearch_modfunc1::drawTableOfIndexedPages(), tslib_cObj::editPanel(), 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(), freesite_admin::getTemplateDetails(), SC_mod_web_perm_index::notEdit(), and tx_sysnotepad::overview_main().

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 string to truncate
integer $chars 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 517 of file class.t3lib_div.php.

References fixed_lgd().

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

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 DEPRECIATED. Use either fixed_lgd() or fixed_lgd_cs() (with negative input value for $chars) Usage: 6

Parameters:
string $string string to truncate
integer $chars must be an integer of at least 4
Returns:
string new string
See also:
fixed_lgd()

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

References fixed_lgd().

Referenced by t3lib_timeTrack::printTSlog().

t3lib_div::fixPermissions file  ) 
 

Setting file system mode & group ownership of file

Parameters:
string Filepath of newly created file
Returns:
void

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

Referenced by t3lib_stdGraphic::combineExec(), t3lib_stdGraphic::imageMagickExec(), upload_copy_move(), and writeFile().

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

Referenced by t3lib_TCEmain::checkValue_group_select_file().

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

Referenced by mod_web_dmail::cmd_displayImport(), mod_web_dmail::cmd_quickmail(), t3lib_rteapi::drawRTE(), tslib_cObj::FORM(), t3lib_fullsearch::getQueryResultCode(), t3lib_TCEforms::getSingleField_typeText(), SC_file_edit::main(), tx_tstemplateinfo::main(), tx_kickstarter_sectionbase::renderTextareaBox(), SC_mod_tools_em_index::showExtDetails(), tx_systodos::todos_createForm(), and tx_install::typo3conf_edit().

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

Referenced by tslib_cObj::bytes(), tx_install::checkTheDatabase(), tx_install::checkTheImageProcessing(), t3lib_TCEmain::checkValue_group_select_file(), mod_web_dmail::cmd_default(), mod_web_dmail::cmd_displayPageInfo(), tx_install::displayTwinImage(), tx_impexp::export_addRecord(), SC_mod_tools_em_index::extDumpTables(), t3lib_tsfeBeUserAuth::extGetCategory_info(), fileList::formatFileList(), SC_mod_tools_em_index::getImportExtList(), SC_mod_tools_isearch_index::getPhashExternalDocs(), SC_mod_tools_isearch_index::getPhashT3pages(), SC_rte_user::main_user(), tx_indexedsearch::makeInfo(), tx_install::typo3conf_edit(), and tx_kickstarter_wizard::view_result().

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

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

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

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

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 1545 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(), SC_browse_links::init(), tslib_pibase::pi_openAtagHrefInJSwindow(), tx_indexedsearch_indexer::splitHTMLContent(), and xmlGetHeaderAttribs().

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

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...
Returns:
array An array with the found files/directories.

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

References get_dirs(), and getFilesInDir().

Referenced by t3lib_TCEforms::addSelectOptionsToItemArray(), tx_indexedsearch_modfunc1::extraIndexing(), SC_mod_tools_em_index::getClassIndexLocallangFiles(), SC_mod_tools_em_index::getFileListOfExtension(), SC_mod_tools_em_index::makeUploadArray(), and SC_mod_tools_em_index::removeExtDirectory().

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 2892 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_impexp::export_addFilesFromRelations(), tx_indexedsearch_indexer::extractLinks(), tx_indexedsearch_modfunc1::extraIndexing(), t3lib_softrefproc::fileadminReferences(), t3lib_softrefproc::findRef_images(), t3lib_softrefproc::findRef_TStemplate(), t3lib_BEfunc::getFlexFormDS(), tx_kickstarter_wizard::getFormContent(), t3lib_TCEforms::getIcon(), t3lib_TCEforms::getSingleField_typeGroup(), getUserObj(), SC_mod_tools_log_index::importData(), tx_indexedsearch_indexer::indexRegularDocument(), SC_wizard_colorpicker::init(), t3lib_cs::initCaseFolding(), t3lib_cs::initCharset(), t3lib_recordList::initializeLanguages(), t3lib_cs::initToASCII(), t3lib_cs::initUnicodeData(), tx_tstemplateinfo::main(), SC_view_help::make_seeAlso(), tx_kickstarter_compilefiles::makeFilesArray(), makeInstanceService(), tx_indexedsearch::makeItemTypeIcon(), tx_indexedsearch_modfunc1::makeItemTypeIcon(), SC_index::makeLoginBoxImage(), tslib_fe::pageNotFoundHandler(), SC_view_help::printImage(), tx_impexp::processSoftReferences_saveFile(), tx_impexp::processSoftReferences_saveFile_createRelFile(), readLLfile(), readLLXMLfile(), tx_cssstyledcontent_pi1::render_uploads(), t3lib_TCEforms::renderWizards(), resolveSheetDefInDS(), t3lib_softrefproc::setTypoLinkPartsElement(), t3lib_parsehtml_proc::TS_images_db(), and tx_impexp::writeFileVerify().

t3lib_div::getFilesInDir path,
extensionList = '',
prependPath = 0,
order = ''
 

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.
Returns:
array Array of the files found

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

Referenced by tx_install::checkTheDatabase(), SC_rte_select_image::expandFolder(), SC_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(), SC_rte_user::main_user(), SC_index::makeLoginBoxImage(), tx_install::stepOutput(), SC_browse_links::TBE_dragNDrop(), SC_browse_links::TBE_expandFolder(), tx_install::typo3conf_edit(), and tx_install::typo3TempManager().

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

References getIndpEnv().

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.

Referenced by alt_menu_functions::adminFunctions(), tslib_fe::beLoginLinkIPList(), tslib_fe::checkAlternativeIdMethods(), t3lib_userAuth::checkAuthentication(), t3lib_tsfeBeUserAuth::checkBackendAccessSettingsFromInitPhp(), tslib_fe::checkDataSubmission(), tslib_fe::checkJumpUrl(), t3lib_beUserAuth::checkLockToIP(), tx_install::checkPassword(), SC_mod_tools_log_index::checkUpload(), clientInfo(), clickMenu::DB_db_list(), tslib_cObj::editIcons(), t3lib_BEfunc::editOnClick(), tslib_cObj::editPanelLinkWrap(), tslib_cObj::editPanelLinkWrap_doWrap(), t3lib_beUserAuth::emailAtLogin(), t3lib_userAuthGroup::fetchGroups(), SC_browse_links::fileList(), tslib_fe::findDomainRecord(), SC_alt_main::generateJScode(), t3lib_userAuth::getAuthInfoArray(), tslib_fe::getConfigArray(), tslib_cObj::getData(), tx_systodos::getEditRedirectUrlForReference(), t3lib_matchCondition::getGP_ENV_TSFE(), getIndpEnv(), t3lib_BEfunc::getPathType_web_nonweb(), tx_cms_layout::getTable_tt_content(), getThisUrl(), t3lib_parsehtml::HTMLcleaner(), SC_rte_user::init(), SC_rte_cleaner::init(), SC_rte_rte::init(), SC_browse_links::init(), user_feAdmin::init(), t3lib_basicFileFunctions::init(), SC_index::init(), t3lib_userAuth::ipLockClause_remoteIPNumber(), template::issueCommand(), tx_cms_layout::languageSelector(), tx_indexedsearch::linkPage(), linkThisScript(), fileList::linkWrapFile(), locationHeaderUrl(), mod_web_dmail::mailModule_main(), SC_wizard_list::main(), SC_wizard_add::main(), SC_tce_file::main(), SC_tce_db::main(), SC_db_list::main(), SC_alt_file_navframe::main(), SC_alt_db_navframe::main(), SC_mod_web_view_index::main(), makeRedirectUrl(), localRecordList::makeReturnUrl(), SC_mod_tools_em_index::makeReturnUrl(), template::makeShortcutIcon(), t3lib_matchCondition::match(), tslib_cObj::netprintApplication_offsiteLinkWrap(), tx_cms_layout::newContentElementOnClick(), t3lib_positionMap::onClickInsertRecord(), TSpagegen::pagegenInit(), tslib_fe::pageNotFoundHandler(), template::parseTime(), tx_install::phpinformation(), tslib_pibase::pi_getEditIcon(), tslib_fe::prefixLocalAnchorsWithScript(), SC_rte_select_image::preinit(), SC_alt_doc::preInit(), freesite_admin::previewData(), tslib_fe::printError(), SC_alt_doc::processData(), TSpagegen::renderContentWithHeader(), SC_db_layout::renderQuickEdit(), mod_user_task::sendEmail(), SC_alt_doc::setDocument(), tslib_fe::setIDfromArgV(), freesite_admin::setNoDomainUrl(), t3lib_parsehtml_proc::siteUrl(), t3lib_formmail::start(), tslib_fe::statistics(), tx_tipafriend::tipform(), tx_tipafriend::tiplink(), t3lib_beUserAuth::trackBeUser(), tx_cms_layout::tt_content_drawHeader(), mod_web_dmail::updatePageTS(), t3lib_BEfunc::viewOnClick(), template::viewPageIcon(), t3lib_userAuthGroup::writelog(), and tx_indexedsearch::writeSearchStat().

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

References dirname(), and getIndpEnv().

t3lib_div::getURL url  ) 
 

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
Returns:
string The content from the resource given as input.

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

Referenced by t3lib_stdGraphic::cacheImageDimensions(), mod_web_dmail::cmd_fetch(), freesite_admin::createdOutput(), freesite_admin::enteringData(), t3lib_stdGraphic::getCachedImageDimensions(), t3lib_parsehtml_proc::getURL(), and freesite_admin::printSelect().

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

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

Referenced by tslib_fe::generatePage_postProcessing(), t3lib_BEfunc::getFlexFormDS(), tx_indexedsearch::hookRequest(), tx_cssstyledcontent_pi1::hookRequest(), tx_indexedsearch_indexer::init(), tx_indexedsearch::initialize(), tx_indexedsearch_indexer::initializeExternalParsers(), tx_wizardcrpages_webfunc_2::main(), tx_indexedsearch_modfunc1::main(), 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_fe::statistics(), and t3lib_matchCondition::whichDevice().

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

References imageMagickCommand().

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

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

References array_merge_recursive_overrule(), and stripSlashesOnArray().

Referenced by tslib_pibase::tslib_pibase().

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

References stripSlashesOnArray().

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 3111 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::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 1090 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_modfunc1::indexExtUrlRecursively(), SC_alt_doc::makeDocSel(), and user_plaintext::parseBody().

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

Compile the command for running ImageMagick/GraphicsMagick.

Parameters:
string Command to be run
string The parameters string
string Override the default path
Returns:
string Compiled command that deals with IM6 & GraphicsMagick

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

References unQuoteFilenames().

Referenced by t3lib_stdGraphic::combineExec(), gif_compress(), t3lib_stdGraphic::imageMagickExec(), t3lib_stdGraphic::imageMagickIdentify(), SC_t3lib_thumbs::main(), and png_to_gif_by_imagemagick().

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

Referenced by SC_alt_doc::compileStoreDat(), SC_alt_doc::functionMenus(), t3lib_BEfunc::getFuncCheck(), t3lib_BEfunc::getFuncInput(), t3lib_BEfunc::getFuncMenu(), template::getTabMenu(), tslib_cObj::getTypoLink(), SC_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(), tx_indexedsearch_modfunc1::printPhashRow(), SC_alt_doc::processData(), SC_db_new_content_el::removeInvalidElements(), SC_db_layout::renderQuickEdit(), and t3lib_TCEforms::renderWizards().

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

Referenced by tslib_cObj::addParams(), tslib_cObj::encaps_lineSplit(), implodeParams(), 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 1643 of file class.t3lib_div.php.

References implodeAttributes().

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 $in_array one-dimensional array of items
string $item item to check for
Returns:
boolean true if $item is in the one-dimensional array $in_array

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

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

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

Referenced by tslib_cObj::_parseFunc(), t3lib_treeView::addField(), t3lib_TCEforms::addSelectOptionsToItemArray(), t3lib_extMgm::addToAllTCAtypes(), t3lib_BEfunc::blindUserNames(), cHashParams(), tslib_cObj::checkIf(), t3lib_TCEmain::checkModifyAccessList(), tx_install::checkTheDatabase(), t3lib_TCEmain::checkValue(), tx_kickstarter_section_fields::cleanUpFieldName(), mod_web_dmail::cmd_displayMailGroup(), t3lib_sqlparser::compileWhereClause(), t3lib_htmlmail::constructHTML_media(), t3lib_TCEmain::copyPages(), t3lib_TCEmain::copyRecord(), t3lib_TCEmain::copyRecord_localize(), mod_web_dmail::createDMail(), tslib_cObj::DBgetInsert(), tslib_cObj::DBgetUpdate(), tslib_cObj::DBmayFEUserEdit(), tx_install::displaySuggestions(), clickMenu::enableDisableItems(), user_feAdmin::evalValues(), SC_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(), tx_kickstarter_sectionbase::fieldIsRTE(), tslib_cObj::filelink(), SC_browse_links::fileList(), tslib_cObj::filelist(), tslib_cObj::fileResource(), tslib_menu::filterMenuPages(), t3lib_TCEforms::foreignTable(), t3lib_extFileFunctions::func_edit(), SC_mod_tools_dbint_index::func_filesearch(), t3lib_extFileFunctions::func_newfile(), SC_mod_tools_dbint_index::func_records(), recordList::generateList(), 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(), tx_ttproducts::getLinkUrl(), tx_ttnews::getLinkUrl(), t3lib_BEfunc::getModuleData(), tx_ttboard::getPagesInPage(), t3lib_BEfunc::getProcessedValue(), t3lib_TCEforms::getSingleField(), t3lib_TCEforms::getSingleField_typeSelect(), localRecordList::getTable(), tx_cms_layout::getTableMenu(), t3lib_softrefproc::getTypoLinkParts(), t3lib_userAuth::hashLockClause_getHashInt(), tslib_cObj::HMENU(), t3lib_stdGraphic::imageMagickConvert(), tx_kickstarter_section_fields::implodeColumns(), SC_mod_tools_log_index::importData(), tx_impexp::includeSoftref(), t3lib_TStemplate::includeStaticTypoScriptSources(), t3lib_basicFileFunctions::is_allowed(), t3lib_TCEforms::isDisplayCondition(), tx_install::isExtensionEnabled(), fileList::isImage(), tslib_menu::isSubMenu(), SC_db_new::isTableAllowedForThisPage(), tx_kickstarter_sectionbase::linkCurrentItems(), recordList::listURL(), TBE_browser_recordList::listURL(), tx_wizardsortpages_webfunc_2::main(), SC_file_edit::main(), tx_tstemplateinfo::main(), mod_web_dmail::main(), SC_t3lib_thumbs::main(), SC_tslib_showpic::main(), SC_mod_tools_log_index::main(), SC_mod_tools_em_index::main(), tx_kickstarter_section_fields::makeFieldTCA(), tslib_menu::makeMenu(), SC_mod_tools_em_index::makeUploadArray(), t3lib_matchCondition::match(), SC_db_layout::menuConfig(), tx_version_cm1::moduleContent(), tslib_cObj::MULTIMEDIA(), tslib_pibase::pi_list_query(), t3lib_clipboard::printContentFromTab(), clickMenu::printFileClickMenu(), tx_tstemplateinfo::procesResources(), tslib_cObj::processParams(), t3lib_TStemplate::processTemplate(), fileList::readDirectory(), tx_tstemplatestyler_modfunc1::readStylesheets(), transferData::regItem(), user_feAdmin::removeRequired(), tx_kickstarter_section_pi::render_extPart(), tx_kickstarter_section_fields::render_extPart(), tx_kickstarter_section_tables::render_wizard(), tx_sysmessages::renderMessages(), tx_tstemplateinfo::resourceListForCopy(), SC_mod_tools_em_index::showExtDetails(), tx_kickstarter_wizard::sidemenu(), tx_impexp::singleRecordLines(), t3lib_stdGraphic::splitString(), t3lib_formmail::start(), tslib_fe::statistics(), tslib_menu::subMenu(), SC_mod_tools_log_index::tableSelector(), SC_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(), tx_kickstarter_wizard::view_result(), and tx_tstemplatestyler_modfunc1::writeStyleContent().

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

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

Referenced by t3lib_stdGraphic::adjust(), t3lib_stdGraphic::calcTextCordsForMap(), t3lib_queryGenerator::cleanInputVal(), t3lib_DB::cleanIntList(), mod_web_dmail::cmd_compileMailGroup(), mod_web_dmail::cmd_testmail(), t3lib_stdGraphic::copyGifOntoGif(), t3lib_stdGraphic::crop(), tslib_cObj::DBmayFEUserEditSelect(), tx_indexedsearch::execFinalQuery(), localPageTree::ext_tree(), tslib_gmenu_foldout::extProc_finish(), tslib_tmenu_layers::extProc_init(), tslib_gmenu_layers::extProc_init(), tx_sysaction::fixUserGroup(), tx_sv_auth::getGroups(), mod_web_dmail::getMailGroups(), tslib_fe::getPageShortcut(), tx_ttboard::getPagesInPage(), 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(), tx_ttboard::main_board(), tx_ttguest::main_guestbook(), tx_ttnews::main_news(), tx_ttrating::main_rating(), 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(), t3lib_TCEforms::renderWizards(), tx_indexedsearch::sectionTableWhere(), tx_ttproducts::setBasketExtras(), tslib_fe::settingLanguage(), t3lib_stdGraphic::setWorkArea(), t3lib_stdGraphic::splitString(), tslib_menu::start(), tslib_gifBuilder::start(), tslib_controlTable::start(), tslib_tableOffset::start(), tslib_cObj::substring(), tx_systodos::todos_createForm(), tx_systodos::todos_printStatus(), and t3lib_stdGraphic::txtPosition().

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

Referenced by SC_mod_tools_log_index::addRecordsForPid(), t3lib_TCEforms::addSelectOptionsToItemArray(), tx_indexedsearch_indexer::bodyDescription(), user_plaintext::breakBulletlist(), t3lib_stdGraphic::calcBBox(), tx_install::checkTheDatabase(), tslib_cObj::COLUMNS(), t3lib_stdGraphic::convertColor(), t3lib_stdGraphic::copyGifOntoGif(), tx_ttproducts::createOrder(), t3lib_TCEforms::dbFileIcons(), recordHistory::displayHistory(), t3lib_dmailer::dmailer_prepare(), 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(), tx_install::formatImCmds(), t3lib_TStemplate::generateConfig(), tslib_fe::getConfigArray(), tx_indexedsearch::getDisplayResults(), t3lib_TCEforms::getExcludeElements(), tx_ttnews::getItemMarkerArray(), tslib_cObj::getQuery(), tx_indexedsearch::getResultRows(), t3lib_TCEforms::getSingleField_typeGroup(), t3lib_TCEforms::getSingleField_typeInput(), t3lib_TCEforms::getSingleField_typeNone_render(), t3lib_TCEforms::getSingleField_typeSelect_multiple(), t3lib_TCEforms::getSingleField_typeSelect_singlebox(), t3lib_TCEforms::getSingleField_typeText(), tslib_cObj::HRULER(), t3lib_parsehtml::HTMLcleaner(), tslib_cObj::IMGTEXT(), t3lib_stdGraphic::IMparams(), SC_wizard_table::init(), SC_tce_db::init(), tx_indexedsearch_indexer::init(), SC_alt_clickmenu::init(), tx_ttproducts::initBasket(), tx_indexedsearch::initialize(), t3lib_clipboard::initializeClipboard(), SC_alt_db_navframe::initializeTemporaryDBmount(), tx_indexed_search_extparse::initParser(), t3lib_stdGraphic::inputLevels(), t3lib_userAuth::ipLockClause_remoteIPNumber(), SC_rte_select_image::magicProcess(), SC_file_upload::main(), SC_file_newfolder::main(), SC_file_list::main(), SC_db_list::main(), SC_alt_mod_frameset::main(), SC_t3lib_thumbs::main(), SC_tslib_showpic::main(), SC_mod_file_images_index::main(), tx_ttnews::main_news(), tx_ttproducts::main_products(), user_wapversion::main_wapversion(), tx_kickstarter_section_fields::makeFieldTCA(), tslib_menu::makeMenu(), t3lib_stdGraphic::makeOutline(), tx_indexedsearch::makeRating(), t3lib_stdGraphic::makeShadow(), tx_indexedsearch::markupSWpartsOfString(), modifyHTMLColor(), tx_ttnews::news_list(), 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_sqlengine::processAccordingToConfig(), tx_ttproducts::products_display(), tx_kickstarter_section_pi::render_extPart(), tx_cssstyledcontent_pi1::render_table(), tx_sysaction::renderActions(), user_plaintext::renderHeader(), SC_db_layout::renderListContent(), tx_sysmessages::renderMessages(), t3lib_TCEforms::renderWizards(), tslib_cObj::SEARCHRESULT(), t3lib_TCEmain::setHistory(), recordList::start(), tslib_gifBuilder::start(), t3lib_userAuth::start(), t3lib_formmail::start(), SC_mod_user_setup_index::storeIncomingData(), mod_web_dmail::storeRecRec(), tx_install::suggestFieldDefinition(), t3lib_parsehtml_proc::TS_transform_rte(), t3lib_stdGraphic::v5_blur(), and t3lib_stdGraphic::v5_sharpen().

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

Referenced by user_feAdmin::evalValues().

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

Referenced by tslib_cObj::clean_directory(), tx_indexedsearch_modfunc1::extraIndexing(), 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 2950 of file class.t3lib_div.php.

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

Referenced by t3lib_svbase::checkInputFile(), t3lib_clipboard::exportClipElementParameters(), tx_indexedsearch_modfunc1::extraIndexing(), tslib_fe::getConfigArray(), tx_indexedsearch_indexer::indexRegularDocument(), SC_show_item::init(), SC_t3lib_thumbs::init(), t3lib_clipboard::printContentFromTab(), clickMenu::printFileClickMenu(), and t3lib_svbase::writeFile().

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

Referenced by tx_sysaction::action_getUserMainDir(), t3lib_userAuthGroup::addFileMount(), t3lib_extMgm::addService(), tslib_cObj::callUserFunction(), callUserFunction(), t3lib_basicFileFunctions::checkPathAgainstMounts(), freesite_admin::createDirs(), SC_browse_links::createFolder(), SC_view_help::createGlossaryIndex(), t3lib_stdGraphic::createTempSubDir(), SC_rte_rte::filterStyleEl(), tx_ttproducts::finalizeOrder(), t3lib_basicFileFunctions::findFirstWebFolder(), t3lib_softrefproc::findRef_images(), t3lib_softrefproc::findRef_TStemplate(), t3lib_extFileFunctions::func_copy(), t3lib_extFileFunctions::func_move(), SC_mod_tools_em_index::getClassIndexLocallangFiles(), getFileAbsFileName(), tx_tstemplatestyler_modfunc1::getFileName(), t3lib_BEfunc::getPathType_web_nonweb(), tx_impexp::getRTEoriginalFilename(), getUserObj(), t3lib_parsehtml::HTMLcleaner(), t3lib_basicFileFunctions::is_webpath(), isAllowedAbsPath(), SC_browse_links::isWebFolder(), fileList::linkWrapFile(), SC_mod_tools_em_index::makeDetailedExtensionAnalysis(), t3lib_matchCondition::match(), tslib_fe::pageNotFoundHandler(), SC_browse_links::parseCurUrl(), tx_impexp::processSoftReferences_saveFile(), tx_impexp::processSoftReferences_saveFile_createRelFile(), 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(), SC_rte_select_image::uploadForm(), SC_browse_links::uploadForm(), tx_impexp::verifyFolderAccess(), writeFileToTypo3tempDir(), and tx_tstemplatestyler_modfunc1::writeResourceFile().

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

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

Referenced by t3lib_clipboard::deleteUrl(), ext_posMap_tt_content::linkPageTitle(), ext_posMap_pages::linkPageTitle(), tx_cms_layout::linkRTEbutton(), tx_kickstarter_sectionbase::linkThisCmd(), SC_db_layout::local_linkThisScript(), 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 2579 of file class.t3lib_div.php.

References array_merge_recursive_overrule(), and implodeArrayForUrl().

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) Usage: 84

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

Definition at line 3262 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(), mod_web_dmail::cmd_fetch(), t3lib_TCEmain::copyRecord(), t3lib_TCEmain::copyRecord_localize(), t3lib_TCEmain::copyRecord_raw(), t3lib_admin::countRecords(), tx_cms_layout::dataFields(), user_feAdmin::deleteFilesFromRecord(), freesite_admin::displayDataForms(), local_beUserAuth::ext_printOverview(), t3lib_TCEmain::extFileFields(), t3lib_TCEmain::extFileFunctions(), t3lib_transferData::fetchRecord(), localRecordList::fieldSelectBox(), t3lib_TCEmain::fillInFieldArray(), t3lib_TCEmain::fixCopyAfterDuplFields(), t3lib_TCEmain::fixUniqueInPid(), recordList::generateList(), 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(), t3lib_TCEforms::getPaletteFields(), t3lib_BEfunc::getProcessedValue(), t3lib_TCEforms::getSingleField(), t3lib_TCEforms::getSingleHiddenField(), t3lib_TCEforms::getSoloField(), tx_cms_layout::getTable(), localRecordList::getTable(), t3lib_BEfunc::getTCAtypes(), t3lib_BEfunc::getTCAtypeValue(), t3lib_TCEmain::getUnique(), tx_cms_layout::headerFields(), tx_install::includeTCA(), SC_show_item::init(), t3lib_treeView::init(), t3lib_queryGenerator::init(), t3lib_recordList::initializeLanguages(), t3lib_admin::lostRecords(), SC_wizard_edit::main(), tx_tstemplateinfo::main(), SC_mod_tools_config_index::main(), SC_view_help::make_seeAlso(), localRecordList::makeControl(), SC_mod_tools_em_index::makeDetailedExtensionAnalysis(), recordList::makeFieldList(), t3lib_queryGenerator::makeFieldList(), recordList::makeSearchString(), mod_web_dmail::mod_web_dmail(), tx_version_cm1::moduleContent(), t3lib_TCEmain::newFieldArray(), 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(), tx_kickstarter_section_fields::render_extPart(), SC_view_help::render_Table(), recordHistory::renderEntry(), 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(), tx_cms_layout::tt_content_drawHeader(), and t3lib_admin::whereIsRecordReferenced().

t3lib_div::locationHeaderUrl path  ) 
 

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

  • If already having a scheme, nothing is prepended
  • If having REQUEST_URI slash '/', then prefixing 'http://[host]' (relative to host)
  • Otherwise prefixed with TYPO3_REQUEST_DIR (relative to current dir / TYPO3_REQUEST_DIR) Usage: 30

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

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

References getIndpEnv().

Referenced by SC_index::checkRedirect(), tx_install::checkTheDatabase(), SC_alt_doc::closeDocument(), SC_tce_file::finish(), SC_tce_db::finish(), tslib_fe::getConfigArray(), SC_wizard_table::getConfigCode(), SC_wizard_forms::getConfigCode(), SC_wizard_add::init(), SC_index::init(), SC_logout::logout(), SC_wizard_list::main(), SC_wizard_edit::main(), SC_wizard_add::main(), SC_mod_help_quick_index::main(), tx_install::outputExitBasedOnStep(), tslib_fe::pageNotFoundHandler(), SC_mod_web_view_index::printContent(), tx_sysaction::renderActions(), SC_db_layout::renderQuickEdit(), recordHistory::revertToPreviousValues(), SC_alt_doc::setDocument(), SC_mod_tools_be_user_index::switchUser(), and mod_web_dmail::updatePageTS().

& 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 The object

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

Referenced by tx_sysaction::action_t1_createUpdateBeUser(), t3lib_TCEforms::addSelectOptionsToItemArray(), SC_wizard_tsconfig::browseTSprop(), tx_sysworkflows_executor::callTCE(), callUserFunction(), tx_install::check_mail(), SC_mod_tools_em_index::checkClearCache(), t3lib_SCbase::checkExtObj(), SC_browse_links::checkFolder(), tslib_gifBuilder::checkTextObj(), tx_install::checkTheImageProcessing(), SC_mod_tools_log_index::checkUpload(), t3lib_TCEmain::checkValue_group_select_file(), t3lib_TCEmain::checkValue_group_select_processDBdata(), SC_db_layout::clearCache(), SC_db_list::clearCache(), SC_mod_web_ts_index::clearCache(), mod_web_dmail::cmd_displayPageInfo(), mod_web_dmail::cmd_displayUserInfo(), mod_web_dmail::cmd_fetch(), mod_web_dmail::cmd_query(), mod_web_dmail::cmd_send_mail(), tslib_cObj::cObjGetSingle(), tx_impexp::compareRecords(), SC_mod_tools_be_user_index::compareUsers(), tslib_cObj::CONTENT(), freesite_admin::copyDummyPages(), t3lib_TCEmain::copyRecord(), t3lib_TCEmain::copyRecord_procBasedOnFieldType(), t3lib_TCEmain::copyRecord_procFilesRefs(), mod_web_dmail::createDMail(), user_feAdmin::createFileFuncObj(), SC_mod_web_ts_index::createTemplate(), tslib_cObj::CTABLE(), tslib_fe::determineId(), tx_indexedsearch_modfunc1::drawTableOfIndexedPages(), tslib_cObj::editPanel(), t3lib_sqlengine::exec_SELECTquery(), SC_rte_select_image::expandFolder(), 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_modfunc1::extraIndexing(), tslib_fe::fe_tce(), tslib_fe::fetch_the_id(), t3lib_userAuthGroup::fetchGroupData(), SC_browse_links::fileList(), t3lib_TCEmain::fillInFieldArray(), tx_ttproducts::finalizeOrder(), 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_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(), t3lib_transferData::getDataIdList(), t3lib_install::getFieldDefinitions_sqlContent_parseTypes(), tx_impexp::getFileProcObj(), tx_kickstarter_wizard::getFormContent(), tslib_cObj::getImgResource(), tx_impexp::getNewTCE(), freesite_admin::getPagesHTML(), t3lib_BEfunc::getPagesTSconfig(), SC_mod_web_perm_index::getRecursiveSelect(), SC_mod_web_modules_index::getRecursiveSelect(), tx_ttnews::getRelated(), tslib_gifBuilder::getResource(), tx_indexedsearch::getSearchWords(), recordList::getTreeObject(), tx_indexedsearch_modfunc1::getUidRootLineForClosestTemplate(), getUserObj(), tslib_feUserAuth::getUserTSconf(), t3lib_syntaxhl::highLight_DS(), t3lib_syntaxhl::highLight_FF(), tslib_cObj::HMENU(), tslib_cObj::HTMLparser_TSbridge(), tslib_cObj::imageLinkWrap(), SC_mod_tools_log_index::importData(), mod_web_dmail::importRecords(), tx_indexedsearch_modfunc1::indexExtUrlRecursively(), SC_wizard_tsconfig::init(), SC_wizard_table::init(), SC_wizard_rte::init(), SC_wizard_forms::init(), SC_wizard_colorpicker::init(), SC_tce_db::init(), language::init(), tx_indexedsearch_indexer::init(), SC_db_new_content_el::init(), SC_show_rechis::init(), SC_show_item::init(), SC_move_el::init(), SC_file_upload::init(), SC_file_rename::init(), SC_file_newfolder::init(), SC_file_list::init(), SC_file_edit::init(), SC_rte_user::init(), SC_rte_select_image::init(), SC_rte_cleaner::init(), SC_db_new::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::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_tools_em_index::init(), SC_mod_file_images_index::init(), SC_tce_file::initClipboard(), SC_tce_db::initClipboard(), tslib_fe::initFEuser(), tx_tstemplatestyler_modfunc1::initialize_editor(), tx_tstemplateobjbrowser::initialize_editor(), tx_tstemplateinfo::initialize_editor(), tx_tstemplateceditor::initialize_editor(), tx_tstemplateanalyzer::initialize_editor(), freesite_admin::initialize_editor(), tx_kickstarter_modfunc1::initKickstarter(), tslib_fe::initTemplate(), SC_mod_tools_be_user_index::initUsers(), mod_web_dmail::invokeMEngine(), tx_sysaction::JScode(), tx_systodos::loadDefinition(), tx_systodos::loadExecutor(), SC_rte_select_image::magicProcess(), SC_wizard_edit::main(), SC_wizard_add::main(), SC_tce_file::main(), tx_wizardsortpages_webfunc_2::main(), tx_wizardcrpages_webfunc_2::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(), tx_tstemplateobjbrowser::main(), tx_tstemplateinfo::main(), tx_tstemplateceditor::main(), SC_rte_select_image::main(), SC_db_list::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(), SC_tslib_showpic::main(), tx_version_cm1::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(), SC_mod_web_info_index::main(), SC_mod_web_func_index::main(), SC_mod_web_ts_index::main(), SC_mod_web_modules_index::main(), SC_mod_tools_phpadmin_index::main(), SC_mod_file_images_index::main(), tx_ttboard::main_board(), SC_browse_links::main_db(), SC_browse_links::main_file(), tx_ttguest::main_guestbook(), tx_ttnews::main_news(), SC_browse_links::main_rte(), tslib_frameset::make(), SC_alt_doc::makeEditForm(), tx_kickstarter_compilefiles::makeFilesArray(), tslib_imgmenu::makeImageMap(), makeInstanceService(), tslib_menu::makeMenu(), t3lib_TStemplate::matching(), tslib_cObj::mergeTSRef(), tx_version_cm1::moduleContent(), tslib_cObj::netprintApplication_offsiteLinkWrap(), tslib_fe::newCObj(), tx_ttnews::news_archiveMenu(), SC_mod_web_perm_index::notEdit(), SC_mod_web_ts_index::noTemplate(), tslib_cObj::OTABLE(), SC_db_new::pagesOnly(), tslib_cObj::parseFunc(), tx_tstemplatestyler_modfunc1::parseHTMLdocument(), tslib_pibase::pi_getEditPanel(), t3lib_positionMap::positionTree(), SC_alt_shortcut::preinit(), t3lib_TCEmain::printLogErrorMessages(), t3lib_extFileFunctions::printLogErrorMessages(), SC_alt_doc::processData(), clickMenu::processingByExtClassArray(), tslib_fe::processOutput(), tx_indexedsearch_modfunc1::processPageKeywords(), tx_impexp::processSoftReferences(), t3lib_fullsearch::queryMaker(), tx_indexed_search_extparse::readFileContent(), tslib_cObj::RECORDS(), tx_indexedsearch_modfunc1::reindexPhash(), t3lib_TCEmain::remapListedDBRecords_procDBRefs(), SC_view_help::render_TOC(), tx_sysaction::renderActions(), TSpagegen::renderContentWithHeader(), t3lib_TCEforms::renderDefaultLanguageDiff(), recordHistory::renderEntry(), SC_show_item::renderFileInfo(), fileList_ext::renderImage(), SC_db_layout::renderListContent(), SC_db_layout::renderQuickEdit(), t3lib_transferData::renderRecord_groupProc(), t3lib_transferData::renderRecord_typesProc(), tx_tstemplateinfo::resourceListForCopy(), recordHistory::revertToPreviousValues(), t3lib_fullsearch::saveQueryInAction(), tslib_cObj::SEARCHRESULT(), t3lib_transferData::selectAddSpecial(), t3lib_admin::selectNonEmptyRecordsWithFkeys(), tslib_fe::sendFormmail(), user_feAdmin::sendHTMLMail(), tx_tipafriend::sendTip(), user_feAdmin::setCObjects(), tx_impexp::setFlexFormRelations(), SC_mod_user_setup_index::simulateUser(), t3lib_sqlengine::sql_query(), tslib_gifBuilder::start(), freesite_admin::startCreate(), tslib_cObj::stdWrap(), SC_mod_user_setup_index::storeIncomingData(), tslib_menu::subMenu(), SC_view_help::substituteGlossaryWords(), tslib_cObj::TEMPLATE(), SC_mod_web_ts_index::templateMenu(), tx_systodos::todos_createForm(), 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_tsparser_ext::upload_copy_file(), t3lib_admin::whereIsRecordReferenced(), SC_db_new_content_el::wizardArray(), tx_tstemplatestyler_modfunc1::writeHTMLdocument(), tslib_tmenu::writeMenu(), and tx_tstemplatestyler_modfunc1::writeStyle().

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

Referenced by tslib_cObj::callUserFunction(), local_beUserAuth::ext_getReadableButNonmounted(), local_beUserAuth::ext_printOverview(), tx_ttproducts::finalizeOrder(), t3lib_fullsearch::getQueryResultCode(), SC_mod_web_modules_index::main(), user_wapversion::main_wapversion(), tx_ttnews::main_xmlnewsfeed(), user_xmlversion::main_xmlversion(), user_feAdmin::sendHTMLMail(), and tx_tipafriend::sendTip().

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

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

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

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')
Returns:
string Processed URL

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

References getIndpEnv().

Referenced by substUrlsInPlainText().

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

Referenced by t3lib_TStemplate::getCurrentPageData(), t3lib_userAuth::hashLockClause_getHashInt(), and t3lib_TStemplate::start().

t3lib_div::milliseconds  ) 
 

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

Returns:
integer

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

Referenced by t3lib_dmailer::dmailer_masssend(), tx_indexedsearch::doSearch(), SC_mod_tools_em_index::fetchServerData(), tx_indexedsearch_indexer::indexRegularDocument(), tx_indexedsearch_indexer::indexTypo3PageContent(), t3lib_dmailer::runcron(), and t3lib_dmailer::shipOfMail().

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

Referenced by tx_impexp::checkOrCreateDir(), SC_mod_tools_em_index::checkUploadFolder(), SC_mod_tools_em_index::clearAndMakeExtensionDir(), SC_mod_tools_em_index::createDirsInPath(), t3lib_stdGraphic::createTempSubDir(), t3lib_extFileFunctions::func_newfolder(), tx_impexp::processSoftReferences_saveFile_createRelFile(), and writeFileToTypo3tempDir().

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

References modifyHTMLColor().

Referenced by t3lib_TCEforms::t3lib_TCEforms().

t3lib_div::plainMailEncoded email,
subject,
message,
headers = '',
enc = '',
charset = 'ISO-8859-1',
dontEncodeSubject = 0
 

Simple substitute for the PHP function mail() which allows you to specify encoding and character set The fifth parameter, $enc, will allow you to specify 'base64' encryption for the output (set $enc=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". If blank, no encoding will be used, no encoding headers set.
string Charset used in encoding-headers (only if $enc is set to a valid value which produces such a header)
boolean If set, the content of $subject will not be encoded.
Returns:
void

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

References quoted_printable(), and trimExplode().

Referenced by mod_web_dmail::cmd_quickmail().

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

References imageMagickCommand().

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

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

References view_array().

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! Important: For the ease of use, this function internally uses Unix linebreaks ("\n") for breaking lines, but the output must use "\r\n" instead! 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 3634 of file class.t3lib_div.php.

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

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

Referenced by SC_rte_rte::JSout().

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

Referenced by t3lib_iconWorks::imagecreatefrom().

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

References getFileAbsFileName(), and readLLXMLfile().

Referenced by 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 3149 of file class.t3lib_div.php.

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

Referenced by readLLfile().

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

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

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

References isFirstPartOfStr().

Referenced by t3lib_TCEforms::addSelectOptionsToItemArray(), tx_indexedsearch_modfunc1::extraIndexing(), SC_mod_tools_em_index::getClassIndexLocallangFiles(), and SC_mod_tools_em_index::removeExtDirectory().

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

References resolveSheetDefInDS().

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

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

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 3282 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(), and resolveAllSheetsInDS().

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

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

Referenced by SC_mod_tools_dbint_index::func_records().

t3lib_div::rmFromList element,
list
 

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

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

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

Referenced by fileList::getTable().

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

Referenced by tslib_gifBuilder::fileName(), 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::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 1440 of file class.t3lib_div.php.

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

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 800 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(), 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::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 1582 of file class.t3lib_div.php.

Referenced by get_tag_attributes().

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

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

t3lib_div::stdAuthCode uid_or_record,
fields = ''
 

standard authentication code - can't remember what it's used for. Usage: 2

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

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

References trimExplode().

Referenced by tslib_fe::checkJumpUrl(), and t3lib_dmailer::dmailer_sendAdvanced().

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

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

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

References makeRedirectUrl().

Referenced by mod_web_dmail::cmd_quickmail(), and t3lib_dmailer::dmailer_sendAdvanced().

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

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

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

Referenced by tslib_cObj::calcAge(), SC_wizard_table::changeFunc(), SC_wizard_forms::changeFunc(), tslib_fe::checkAndSetAlias(), tslib_fe::checkJumpUrl(), tx_install::checkTheDatabase(), tx_ttproducts::cleanConfArr(), user_feAdmin::compileMail(), SC_mod_tools_em_index::construct_ext_emconf_file(), t3lib_loadDBGroup::convertPosNeg(), mod_web_dmail::createDMail(), debug(), tslib_fe::determineId(), t3lib_TCEmain::doesRecordExist(), SC_alt_main::editPageHandling(), SC_alt_shortcut::editPageIdFunc(), tslib_cObj::editPanelLinkWrap(), SC_browse_links::expandPage(), t3lib_tsparser_ext::ext_getObjTree(), tslib_cObj::fillInMarkerArray(), t3lib_timeTrack::fixContent(), t3lib_TCEforms::getExcludeElements(), t3lib_BEfunc::getFlexFormDS(), tx_install::getItemArrayType(), t3lib_BEfunc::getPidForModTSconfig(), t3lib_TCEforms::getSingleField(), t3lib_BEfunc::getTSconfig_pidValue(), t3lib_softrefproc::getTypoLinkParts(), mod_web_dmail::importRecords_sort(), SC_wizard_add::init(), tx_ttproducts::initBasket(), t3lib_clipboard::initializeClipboard(), tslib_cObj::listNum(), SC_wizard_edit::main(), tx_cmsplaintextimport_webfunc::main(), SC_alt_doc::makeButtonPanel(), tslib_menu::makeMenu(), t3lib_matchCondition::match(), SC_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(), SC_mod_web_ts_index::renderList(), SC_db_layout::renderQuickEdit(), tx_tstemplatestyler_modfunc1::renderSelector(), t3lib_TCEforms::renderWizards(), tslib_cObj::SEARCHRESULT(), user_feAdmin::sendInfoMail(), t3lib_TCEmain::setTSconfigPermissions(), t3lib_softrefproc::setTypoLinkPartsElement(), t3lib_parsehtml_proc::TS_links_rte(), tx_install::typo3TempManager(), tslib_cObj::typoLink(), tx_tstemplateobjbrowser::verify_TSobjects(), and t3lib_arrayBrowser::wrapArrayKey().

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

t3lib_div::uniqueArray valueArray  ) 
 

Remove duplicate values from an array This function is deprecated, use the PHP function array_unique instead Usage: 0

Parameters:
array Array of values to make unique
Returns:
array
Deprecated:

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

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 is set will show a warning!
Returns:
string Returns the list without any duplicates of values, space around values are trimmed

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

References trimExplode().

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

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

References isFirstPartOfStr(), and validPathStr().

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

t3lib_div::unQuoteFilenames parameters  ) 
 

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
Returns:
array Exploded parameters

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

Referenced by imageMagickCommand().

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

References fixPermissions().

Referenced by t3lib_TCEmain::checkValue_group_select_file(), t3lib_extFileFunctions::func_upload(), 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 3011 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::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 1154 of file class.t3lib_div.php.

Referenced by tslib_cObj::checkEmail(), t3lib_readmail::extractNameEmail(), and tx_tipafriend::getRecipients().

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 '//', '..' or '\' is in the $theFile
Todo:
Possible improvement: Should it rawurldecode the string first to check if any of these characters is encoded ?

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

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

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

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

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 2427 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(), makeInstanceService(), tx_install::phpinformation(), print_array(), tx_impexp::printErrorLog(), t3lib_timeTrack::printTSlog(), tx_indexedsearch_modfunc1::reindexPhash(), and tx_indexedsearch_modfunc1::showDetailsForPhash().

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

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

References fixPermissions().

Referenced by SC_mod_tools_em_index::checkUploadFolder(), SC_mod_tools_em_index::extDumpTables(), 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(), tx_tstemplateinfo::main(), SC_mod_tools_em_index::processRepositoryReturnData(), tx_impexp::processSoftReferences_saveFile_createRelFile(), SC_mod_tools_em_index::showExtDetails(), t3lib_parsehtml_proc::TS_images_db(), tx_install::typo3conf_edit(), SC_mod_tools_em_index::updateLocalEM_CONF(), t3lib_extMgm::writeCacheFiles(), writeFileToTypo3tempDir(), tx_impexp::writeFileVerify(), tx_tstemplatestyler_modfunc1::writeResourceFile(), and t3lib_install::writeToLocalconf_control().

t3lib_div::writeFileToTypo3tempDir filepath,
content
 

Writes $content to a filename in the typo3temp/ folder (and possibly a subfolder...) 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 2150 of file class.t3lib_div.php.

References isFirstPartOfStr(), mkdir(), validPathStr(), and writeFile().

Referenced by t3lib_cs::initCharset(), t3lib_cs::initToASCII(), t3lib_cs::initUnicodeData(), and readLLXMLfile().

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 1888 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_TCEforms::getSingleField_typeFlex(), t3lib_syntaxhl::highLight_DS(), t3lib_syntaxhl::highLight_FF(), tx_impexp::loadFile(), tslib_pibase::pi_initPIflexForm(), tx_impexp::processSoftReferences(), readLLXMLfile(), t3lib_TCEmain::remapListedDBRecords(), t3lib_transferData::renderRecord_flexProc(), resolveSheetDefInDS(), and tx_impexp::setFlexFormRelations().

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

References xmlRecompileFromStructValArray().

Referenced by tx_indexed_search_extparse::readFileContent().

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

References get_tag_attributes().

Referenced by t3lib_TCEforms::getSingleField_typeFlex().

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

Referenced by xml2tree().


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


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