[ Index ] |
|
Code source de Typo3 4.1.3 |
[Code source] [Imprimer] [Statistiques]
Contains class which has functions that generates a difference output of a content string $Id: class.t3lib_diff.php 1421 2006-04-10 09:27:15Z mundaun $ Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj XHTML Compliant
Author: | Kasper Skaarhoj <kasperYYYY@typo3.com> |
Poids: | 238 lignes (8 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
t3lib_diff:: (5 méthodes):
makeDiffDisplay()
getDiff()
addClearBuffer()
explodeStringIntoWords()
tagSpace()
Classe: t3lib_diff - X-Ref
This class has functions which generates a difference output of a content stringmakeDiffDisplay($str1,$str2,$wrapTag='span') X-Ref |
This will produce a color-marked-up diff output in HTML from the input strings. param: string String 1 param: string String 2 param: string Setting the wrapping tag name return: string Formatted output. |
getDiff($str1,$str2) X-Ref |
Produce a diff (using the "diff" application) between two strings The function will write the two input strings to temporary files, then execute the diff program, delete the temp files and return the result. param: string String 1 param: string String 2 return: array The result from the exec() function call. |
addClearBuffer($clearBuffer,$last=0) X-Ref |
Will bring down the length of strings to < 150 chars if they were longer than 200 chars. This done by preserving the 70 first and last chars and concatenate those strings with "..." and a number indicating the string length param: string The input string. param: boolean If set, it indicates that the string should just end with ... (thus no "complete" ending) return: string Processed string. |
explodeStringIntoWords($str) X-Ref |
Explodes the input string into words. This is done by splitting first by lines, then by space char. Each word will be in stored as a value in an array. Lines will be indicated by two subsequent empty values. param: string The string input return: array Array with words. |
tagSpace($str,$rev=0) X-Ref |
Adds a space character before and after HTML tags (more precisely any found < or >) param: string String to process param: boolean If set, the < > searched for will be < and > return: string Processed string |
Généré le : Sun Nov 25 17:13:16 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |