Fonctions membres publiques | |
| trimExplode ($delim, $string, $onlyNonEmptyValues=0) | |
| dirname ($path) | |
| revExplode ($delim, $string, $count=0) | |
| getIndpEnv ($getEnvName) | |
| _GP ($var) | |
| _GET ($var=NULL) | |
| _POST ($var=NULL) | |
| _GETset ($inputGet, $key='') | |
| GPvar ($var, $strip=0) | |
| GParrayMerged ($var) | |
| gif_compress ($theFile, $type) | |
| png_to_gif_by_imagemagick ($theFile) | |
| read_png_gif ($theFile, $output_png=0) | |
| fixed_lgd ($string, $origChars, $preStr='...') | |
| fixed_lgd_pre ($string, $chars) | |
| fixed_lgd_cs ($string, $chars) | |
| breakTextForEmail ($str, $implChar="\n", $charWidth=76) | |
| breakLinesForEmail ($str, $implChar="\n", $charWidth=76) | |
| cmpIP ($baseIP, $list) | |
| cmpIPv4 ($baseIP, $list) | |
| cmpIPv6 ($baseIP, $list) | |
| IPv6Hex2Bin ($hex) | |
| normalizeIPv6 ($address) | |
| validIPv6 ($ip) | |
| cmpFQDN ($baseIP, $list) | |
| inList ($list, $item) | |
| rmFromList ($element, $list) | |
| expandList ($list) | |
| intInRange ($theInt, $min, $max=2000000000, $zeroValue=0) | |
| intval_positive ($theInt) | |
| int_from_ver ($verNumberStr) | |
| compat_version ($verNumberStr) | |
| md5int ($str) | |
| shortMD5 ($input, $len=10) | |
| uniqueList ($in_list, $secondParameter=NULL) | |
| split_fileref ($fileref) | |
| dirname ($path) | |
| modifyHTMLColor ($color, $R, $G, $B) | |
| modifyHTMLColorAll ($color, $all) | |
| rm_endcomma ($string) | |
| danish_strtoupper ($string) | |
| convUmlauts ($str) | |
| testInt ($var) | |
| isFirstPartOfStr ($str, $partStr) | |
| formatSize ($sizeInBytes, $labels='') | |
| convertMicrotime ($microtime) | |
| splitCalc ($string, $operators) | |
| calcPriority ($string) | |
| calcParenthesis ($string) | |
| htmlspecialchars_decode ($value) | |
| deHSCentities ($str) | |
| slashJS ($string, $extended=0, $char="'") | |
| rawUrlEncodeJS ($str) | |
| rawUrlEncodeFP ($str) | |
| validEmail ($email) | |
| formatForTextarea ($content) | |
| inArray ($in_array, $item) | |
| intExplode ($delim, $string) | |
| revExplode ($delim, $string, $count=0) | |
| trimExplode ($delim, $string, $onlyNonEmptyValues=0) | |
| uniqueArray ($valueArray) | |
| removeArrayEntryByValue ($array, $cmpValue) | |
| implodeArrayForUrl ($name, $theArray, $str='', $skipBlank=0, $rawurlencodeParamName=0) | |
| explodeUrl2Array ($string, $multidim=FALSE) | |
| compileSelectedGetVarsFromArray ($varList, $getArray, $GPvarAlt=1) | |
| addSlashesOnArray (&$theArray) | |
| stripSlashesOnArray (&$theArray) | |
| slashArray ($arr, $cmd) | |
| array_merge_recursive_overrule ($arr0, $arr1, $notAddKeys=0, $includeEmtpyValues=true) | |
| array_merge ($arr1, $arr2) | |
| csvValues ($row, $delim=',', $quote='"') | |
| removeDotsFromTS ($ts) | |
| get_tag_attributes ($tag) | |
| split_tag_attributes ($tag) | |
| implodeAttributes ($arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE) | |
| implodeParams ($arr, $xhtmlSafe=FALSE, $dontOmitBlankAttribs=FALSE) | |
| wrapJS ($string, $linebreak=TRUE) | |
| xml2tree ($string, $depth=999) | |
| array2xml_cs ($array, $docTag='phparray', $options=array(), $charset='') | |
| array2xml ($array, $NSprefix='', $level=0, $docTag='phparray', $spaceInd=0, $options=array(), $stackData=array()) | |
| xml2array ($string, $NSprefix='', $reportDocTag=FALSE) | |
| xmlRecompileFromStructValArray ($vals) | |
| xmlGetHeaderAttribs ($xmlData) | |
| getURL ($url, $includeHeader=0, $requestHeaders=false) | |
| writeFile ($file, $content) | |
| fixPermissions ($file) | |
| writeFileToTypo3tempDir ($filepath, $content) | |
| mkdir ($theNewFolder) | |
| mkdir_deep ($destination, $deepDir) | |
| get_dirs ($path) | |
| getFilesInDir ($path, $extensionList='', $prependPath=0, $order='', $excludePattern='') | |
| getAllFilesAndFoldersInPath ($fileArr, $path, $extList='', $regDirs=0, $recursivityLevels=99, $excludePattern='') | |
| removePrefixPathFromList ($fileArr, $prefixToRemove) | |
| fixWindowsFilePath ($theFile) | |
| resolveBackPath ($pathStr) | |
| locationHeaderUrl ($path) | |
| debug_ordvalue ($string, $characters=100) | |
| view_array ($array_in) | |
| print_array ($array_in) | |
| debug ($var="", $brOrHeader=0) | |
| debug_trail () | |
| debugRows ($rows, $header='') | |
| getThisUrl () | |
| linkThisScript ($getParams=array()) | |
| linkThisUrl ($url, $getParams=array()) | |
| getIndpEnv ($getEnvName) | |
| milliseconds () | |
| clientInfo ($useragent='') | |
| getHostname ($requestHost=TRUE) | |
| getFileAbsFileName ($filename, $onlyRelative=1, $relToTYPO3_mainDir=0) | |
| validPathStr ($theFile) | |
| isAbsPath ($path) | |
| isAllowedAbsPath ($path) | |
| verifyFilenameAgainstDenyPattern ($filename) | |
| upload_copy_move ($source, $destination) | |
| upload_to_tempfile ($uploadedFileName) | |
| unlink_tempfile ($uploadedTempFileName) | |
| tempnam ($filePrefix) | |
| stdAuthCode ($uid_or_record, $fields='', $codeLength=8) | |
| cHashParams ($addQueryParams) | |
| hideIfNotTranslated ($l18n_cfg_fieldValue) | |
| readLLfile ($fileRef, $langKey) | |
| readLLXMLfile ($fileRef, $langKey) | |
| llXmlAutoFileName ($fileRef, $language) | |
| loadTCA ($table) | |
| resolveSheetDefInDS ($dataStructArray, $sheet='sDEF') | |
| resolveAllSheetsInDS ($dataStructArray) | |
| callUserFunction ($funcName, &$params, &$ref, $checkPrefix='user_', $silent=0) | |
| & | getUserObj ($classRef, $checkPrefix='user_', $silent=0) |
| & | makeInstance ($className) |
| makeInstanceClassName ($className) | |
| & | makeInstanceService ($serviceType, $serviceSubType='', $excludeServiceKeys=array()) |
| requireOnce ($requireFile) | |
| plainMailEncoded ($email, $subject, $message, $headers='', $encoding='quoted-printable', $charset='', $dontEncodeHeader=false) | |
| quoted_printable ($string, $maxlen=76) | |
| encodeHeader ($line, $enc='quoted-printable', $charset='ISO-8859-1') | |
| substUrlsInPlainText ($message, $urlmode='76', $index_script_url='') | |
| makeRedirectUrl ($inUrl, $l=0, $index_script_url='') | |
| freetypeDpiComp ($font_size) | |
| initSysLog () | |
| sysLog ($msg, $extKey, $severity=0) | |
| devLog ($msg, $extKey, $severity=0, $dataVar=FALSE) | |
| arrayToLogString ($arr, $valueList=array(), $valueLength=20) | |
| imageMagickCommand ($command, $parameters, $path='') | |
| unQuoteFilenames ($parameters, $unQuote=FALSE) | |
| quoteJSvalue ($value, $inScriptTags=false) | |
| t3lib_div::trimExplode | ( | $ | delim, | |
| $ | string, | |||
| $ | onlyNonEmptyValues = 0 | |||
| ) |
| t3lib_div::dirname | ( | $ | path | ) |
| t3lib_div::revExplode | ( | $ | delim, | |
| $ | string, | |||
| $ | count = 0 | |||
| ) |
| 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
| 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 |
| 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
| string | GET/POST var to return |
| 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
| string | Optional pointer to value in GET array (basically name of GET var) |
| 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
| string | Optional pointer to value in POST array (basically name of POST var) |
| t3lib_div::_GETset | ( | $ | inputGet, | |
| $ | key = '' | |||
| ) |
Writes input value to $_GET Usage: 2
| 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! |
| 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
| 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() |
| t3lib_div::GParrayMerged | ( | $ | var | ) |
Returns the GET/POST global arrays merged with POST taking precedence. Usage: 1
| string | Key (variable name) from GET or POST vars |
| 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
| string | Filepath | |
| string | See description of function |
| 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
| string | $theFile the filename with path |
| 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
| string | Filepath of image file | |
| boolean | If set, then input file is converted to PNG, otherwise to GIF |
| t3lib_div::fixed_lgd | ( | $ | string, | |
| $ | origChars, | |||
| $ | preStr = '...' | |||
| ) |
Truncate string Returns a new string of max. $chars length. If the string is longer, it will be truncated and appended with '...'. Usage: 39
| string | string to truncate | |
| integer | must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end. | |
| string | String to append to the output if it is truncated, default is '...' |
| t3lib_div::fixed_lgd_pre | ( | $ | string, | |
| $ | chars | |||
| ) |
Truncate string Returns a new string of max. $chars length. If the string is longer, it will be truncated and prepended with '...'. This works like fixed_lgd, but is truncated in the start of the string instead of the end Usage: 6
| string | string to truncate | |
| integer | must be an integer of at least 4 |
| 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
| string | string to truncate | |
| integer | must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end. |
| t3lib_div::breakTextForEmail | ( | $ | str, | |
| $ | implChar = "\n", |
|||
| $ | charWidth = 76 | |||
| ) |
Breaks up the text for emails Usage: 1
| string | The string to break up | |
| string | The string to implode the broken lines with (default/typically ) | |
| integer | The line length |
| t3lib_div::breakLinesForEmail | ( | $ | str, | |
| $ | implChar = "\n", |
|||
| $ | charWidth = 76 | |||
| ) |
Breaks up a single line of text for emails Usage: 5
| string | The string to break up | |
| string | The string to implode the broken lines with (default/typically ) | |
| integer | The line length |
| t3lib_div::cmpIP | ( | $ | baseIP, | |
| $ | list | |||
| ) |
Match IP number with list of numbers with wildcard Dispatcher method for switching into specialised IPv4 and IPv6 methods. Usage: 10
| string | $baseIP is the current remote IP address for instance, typ. REMOTE_ADDR | |
| string | $list is a comma-list of IP-addresses to match with. *-wildcard allowed instead of number, plus leaving out parts in the IP number is accepted as wildcard (eg. 192.168.*.* equals 192.168). If list is "*" no check is done and the function returns TRUE immediately. |
| t3lib_div::cmpIPv4 | ( | $ | baseIP, | |
| $ | list | |||
| ) |
Match IPv4 number with list of numbers with wildcard
| 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) |
| t3lib_div::cmpIPv6 | ( | $ | baseIP, | |
| $ | list | |||
| ) |
Match IPv6 address with a list of IPv6 prefixes
| string | $baseIP is the current remote IP address for instance | |
| string | $list is a comma-list of IPv6 prefixes, could also contain IPv4 addresses |
| t3lib_div::IPv6Hex2Bin | ( | $ | hex | ) |
[Describe function...]
| [type] | $hex: ... |
| t3lib_div::normalizeIPv6 | ( | $ | address | ) |
Normalize an IPv6 address to full length
| string | Given IPv6 address |
| t3lib_div::validIPv6 | ( | $ | ip | ) |
Validate a given IP address to the IPv6 address format.
Example for possible format: 43FBBB3F:A0A0:0 | ::1
| string | IP address to be tested |
| t3lib_div::cmpFQDN | ( | $ | baseIP, | |
| $ | list | |||
| ) |
Match fully qualified domain name with list of strings with wildcard
| string | The current remote IP address for instance, typ. REMOTE_ADDR | |
| string | A comma-list of domain names to match with. *-wildcard allowed but cannot be part of a string, so it must match the full host name (eg. myhost.*.com => correct, myhost.*domain.com => wrong) |
| t3lib_div::inList | ( | $ | list, | |
| $ | item | |||
| ) |
Check for item in list Check if an item exists in a comma-separated list of items. Usage: 163
| string | comma-separated list of items (string) | |
| string | item to check for |
| t3lib_div::rmFromList | ( | $ | element, | |
| $ | list | |||
| ) |
Removes an item from a comma-separated list of items. Usage: 1
| string | element to remove | |
| string | comma-separated list of items (string) |
| 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.
| string | comma-separated list of integers with ranges (string) |
| 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
| integer | Input value | |
| integer | Lower limit | |
| integer | Higher limit | |
| integer | Default value if input is false. |
| t3lib_div::intval_positive | ( | $ | theInt | ) |
Returns the $integer if greater than zero, otherwise returns zero. Usage: 1
| integer | Integer string to process |
| t3lib_div::int_from_ver | ( | $ | verNumberStr | ) |
Returns an integer from a three part version number, eg '4.12.3' -> 4012003 Usage: 2
| string | Version number on format x.x.x |
| t3lib_div::compat_version | ( | $ | verNumberStr | ) |
Returns true if the current TYPO3 version (or compatibility version) is compatible to the input version Notice that this function compares branches, not versions (4.0.1 would be > 4.0.0 although they use the same compat_version)
| string | Minimum branch number required (format x.y / e.g. "4.0" NOT "4.0.0"!) |
| t3lib_div::md5int | ( | $ | str | ) |
Makes a positive integer hash out of the first 7 chars from the md5 hash of the input Usage: 5
| string | String to md5-hash |
| t3lib_div::shortMD5 | ( | $ | input, | |
| $ | len = 10 | |||
| ) |
Returns the first 10 positions of the MD5-hash (changed from 6 to 10 recently)
Usage: 37
| string | Input string to be md5-hashed | |
| integer | The string-length of the output |
| 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
| string | Accept multiple parameters wich can be comma-separated lists of values and arrays. | |
| mixed | $secondParameter: Dummy field, which if set will show a warning! |
| t3lib_div::split_fileref | ( | $ | fileref | ) |
Splits a reference to a file in 5 parts Usage: 43
| string | Filename/filepath to be analysed |
| 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
| string | Directory name / path |
| t3lib_div::modifyHTMLColor | ( | $ | color, | |
| $ | R, | |||
| $ | G, | |||
| $ | B | |||
| ) |
Modifies a HTML Hex color by adding/subtracting $R,$G and $B integers Usage: 11
| string | A hexadecimal color code, xxxxxx | |
| integer | Offset value 0-255 | |
| integer | Offset value 0-255 | |
| integer | Offset value 0-255 |
| t3lib_div::modifyHTMLColorAll | ( | $ | color, | |
| $ | all | |||
| ) |
Modifies a HTML Hex color by adding/subtracting $all integer from all R/G/B channels Usage: 6
| string | A hexadecimal color code, xxxxxx | |
| integer | Offset value 0-255 for all three channels. |
| t3lib_div::rm_endcomma | ( | $ | string | ) |
Removes comma (if present) in the end of string Usage: 2
| string | String from which the comma in the end (if any) will be removed. |
| t3lib_div::danish_strtoupper | ( | $ | string | ) |
strtoupper which converts danish (and other characters) characters as well Usage: 0
| string | String to process |
| t3lib_div::convUmlauts | ( | $ | str | ) |
Change umlaut characters to plain ASCII with normally two character target Only known characters will be converted, so don't expect a result for any character.
ä => ae, Ö => Oe
| string | String to convert. |
| t3lib_div::testInt | ( | $ | var | ) |
Tests if the input is an integer. Usage: 77
| mixed | Any input variable to test. |
| t3lib_div::isFirstPartOfStr | ( | $ | str, | |
| $ | partStr | |||
| ) |
Returns true if the first part of $str matches the string $partStr Usage: 59
| string | Full string to check | |
| string | Reference string which must be found as the "first part" of the full string |
| t3lib_div::formatSize | ( | $ | sizeInBytes, | |
| $ | labels = '' | |||
| ) |
Formats the input integer $sizeInBytes as bytes/kilobytes/megabytes (-/K/M) Usage: 53
| 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) |
| t3lib_div::convertMicrotime | ( | $ | microtime | ) |
Returns microtime input to milliseconds Usage: 2
| string | Microtime |
| t3lib_div::splitCalc | ( | $ | string, | |
| $ | operators | |||
| ) |
This splits a string by the chars in $operators (typical /+-*) and returns an array with them in Usage: 2
| string | Input string, eg "123 + 456 / 789 - 4" | |
| string | Operators to split by, typically "/+-*" |
| t3lib_div::calcPriority | ( | $ | string | ) |
Calculates the input by +,-,*,/,%,^ with priority to + and - Usage: 1
| string | Input string, eg "123 + 456 / 789 - 4" |
| t3lib_div::calcParenthesis | ( | $ | string | ) |
Calculates the input with parenthesis levels Usage: 2
| string | Input string, eg "(123 + 456) / 789 - 4" |
| t3lib_div::htmlspecialchars_decode | ( | $ | value | ) |
Inverse version of htmlspecialchars() Usage: 4
| string | Value where >, <, " and & should be converted to regular chars. |
| t3lib_div::deHSCentities | ( | $ | str | ) |
Re-converts HTML entities if they have been converted by htmlspecialchars() Usage: 10
| string | String which contains eg. "&amp;" which should stay "&". Or "&#1234;" to "Ӓ". Or "&#x1b;" to "" |
| t3lib_div::slashJS | ( | $ | string, | |
| $ | extended = 0, |
|||
| $ | char = "'" | |||
| ) |
This function is used to escape any ' -characters when transferring text to JavaScript! Usage: 3
| string | String to escape | |
| boolean | If set, also backslashes are escaped. | |
| string | The character to escape, default is ' (single-quote) |
| 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
| string | String to raw-url-encode with spaces preserved |
| t3lib_div::rawUrlEncodeFP | ( | $ | str | ) |
rawurlencode which preserves "/" chars Usefull when filepaths should keep the "/" chars, but have all other special chars encoded. Usage: 5
| string | Input string |
| t3lib_div::validEmail | ( | $ | ) |
Checking syntax of input email address Usage: 5
| string | Input string to evaluate |
| 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
| string | Input string to be formatted. |
| 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
| array | one-dimensional array of items | |
| string | item to check for |
| 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
| string | Delimiter string to explode with | |
| string | The string to explode |
| 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
| string | Delimiter string to explode with | |
| string | The string to explode | |
| integer | Number of array entries |
| 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
| string | Delimiter string to explode with | |
| string | The string to explode | |
| boolean | If set, all empty values (='') will NOT be set in output |
| t3lib_div::uniqueArray | ( | $ | valueArray | ) |
Remove duplicate values from an array Usage: 0
| array | Array of values to make unique |
| t3lib_div::removeArrayEntryByValue | ( | $ | array, | |
| $ | cmpValue | |||
| ) |
Removes the value $cmpValue from the $array if found there. Returns the modified array Usage: 3
| array | Array containing the values | |
| string | Value to search for and if found remove array entry where found. |
| t3lib_div::implodeArrayForUrl | ( | $ | name, | |
| $ | theArray, | |||
| $ | str = '', |
|||
| $ | skipBlank = 0, |
|||
| $ | rawurlencodeParamName = 0 | |||
| ) |
Implodes a multidim-array into GET-parameters (eg. ¶m[key][key2]=value2¶m[key][key3]=value3) Usage: 24
| 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. |
| t3lib_div::explodeUrl2Array | ( | $ | string, | |
| $ | multidim = FALSE | |||
| ) |
Explodes a string with GETvars (eg. "&id=1&type=2&ext[mykey]=3") into an array
| 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()) |