SGL_StringVarious string helper methods.
Located in /SGL/String.php (line 53)
static string
summarise
(string $str, [integer $limit = 50], [integer $element = SGL_WORD], [string $appendString = ' ...'])
string
translate
(string $key, [string $filter = false], [array $aParams = array()], [string $langCode = null])
string
translate2
(string $key, [string $filter = false], [array $aParams = array()], string $langCode)
static censor (line 64)
Censors profanity.
static escapeSingleQuote (line 859)
Esacape single quote.
static escapeSingleQuoteInArrayKeys (line 875)
Escape single quotes in every key of given array.
static isCyrillic (line 791)
Checks if strings has cyrillic chars.
static pseudoConstantToInt (line 832)
Converts strings representing constants to int values.
Used for when constants are stored as strings in config.
static replaceAccents (line 773)
Replaces accents in string.
static summarise (line 548)
Returns a shortened version of text string resolved by word boundaries.
char2entity (line 404)
Encode a given character to a decimal or hexadecimal HTML entity or to an hexadecimal URL-encoded symbol.
clean (line 167)
Returns cleaned user input.
Instead of addslashing potential ' and " chars, let's remove them and get rid of any magic quoting which is enabled by default. Also removes any html tags and ASCII zeros
convertHighAscii (line 683)
dirify (line 669)
dispelMagicQuotes (line 141)
If magic_quotes_gpc is in use, run stripslashes() on $var.
formatBytes (line 625)
Converts bytes to KB/MB/GB as appropriate.
getCrlf (line 107)
Defines the <CR><LF> value depending on the user OS.
mungeMailAddress (line 519)
Munge email addresses swapping plain text with html char entities as explained here: http://perso.crans.org/~raffo/aem/index.php.
obfuscate (line 447)
Primarily used for obfuscating email addresses to prevent spam harvesting. Since it is URL-encoded, this can be used only in the href part of a <a> tag (mailto: scheme).
obfuscate2 (line 465)
Primarily used for obfuscating email addresses to prevent spam harvesting.
obfuscate3 (line 493)
Lightweight function to obfuscate mail addresses: substitutes @ and dots in the domain part with a string.
removeJs (line 184)
stripIniFileIllegalChars (line 818)
Removes chars that are illegal in ini files.
summariseHtml (line 592)
Returns a set number of lines of a block of html, for summarising articles.
tidy (line 219)
Uses PHP tidy lib (http://www.coggeshall.org/tidy.php) if enabled and
extension is available. Cleans/corrects input html. If $logErrors is set to true and logging is set to true in default.conf.ini, tidy() will add entry to log with a string describing the errors and changes Tidy made via SGL::logMessage().
to7bit (line 745)
toValidFileName (line 663)
toValidVariableName (line 651)
translate (line 275)
Looks up key in current lang file (determined by preference) and returns target value.
translate2 (line 354)
Looks up key in current lang dictionary (SGL_Translation3) or specific language and returns target value.
trimWhitespace (line 117)
Documentation generated on Tue, 23 Feb 2010 18:14:33 +0000 by phpDocumentor 1.4.3