- Benchmark Class
- Cache Class
- Captcha Class
- cURL Class
- Database Class
- Date Class
- Errors Class
- FileSystem Class
- FTP Class
- Images Class
- Language Class
- Logger Class
- Number Class
- PayPal Class
- PHPMailer Class
- Plugins Class
- RestClient Class
- Security Class
- Template Class
- Text Class
- URL Class
- XML Class
- ZIP Class
The following sections explain each method of the class.
strip_tags_with_content (from v2.5.0)
public static string strip_tags_with_content (string $str, array $removeContentTags = array('table'))
By means of the method
strip_tags_with_content can HTML tags, remove its contents. The normal PHP function
strip_tags away here only during the day, but leaves behind the content. For some HTML tags but this is very useless, such as in HTML tables.
The text with the HTML tags as content, which should be removed.
In the array one specifies which HTML tags are to be removed and its contents. If this tag is not specified, only the HTML is removed the day itself and the content remains.
public static string word_limiter (string $str, int $limit = 100, string $suffix = '...')
Limited a set to a specific number of words. The residue is replaced by a so-called suffix. This means that text block is appended at the end of the shortened set.
The string whose content is to be reduced to a specific word limit.
The maximum number of words that may occur in the string. From then be reduced. By default set to 100.
The suffix should be attached at the end of the sentence. "..." Put on by default.
public static string truncate (string $string, int $limit, string $suffix = '...')
Reduces a string to a certain number of characters down and replace the rest by a suffix.
The string to be truncated to a certain number of characters.
The maximum number of characters may have the string.
The suffix to the rest of the string, which is removed, replaced.
getCharacterEncoding (from v2.4.0)
public static string|bool getCharacterEncoding (string $str)
Determines the character encoding of a string.
The whose character encoding string to be determined.
convertToUTF8 (from v2.4.0)
public static string convertToUTF8 (string $str, string $encoding)
Converts a string into a UTF-8 string.
The string to be Converted to the character encoding UTF-8.
The original character encoding of the string.
public static string word_censor (string $str, array $censored, string $replacement = '')
Censored certain words from a string and replaces it with another string.
The string whose content is to be searched on Censored words.
The array of censored words.
The string whereby the censored words to be replaced.
public static string highlight_code (string $str)
Highlighted PHP code in a string
The content whose string is to be searched for PHP tags and then this Highlighted.
public static string random_string (string $type = 'normal', int $length = 10)
Returns a random string in a certain length.
The type of string is to come back. The following are available:
md5An MD5 hash from the current timestamp and a random UNIQ ID
alnumAn alphanumeric string consisting of being able to following signs: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
numericA numeric string consisting of being able to following signs: 0123456789
nozeroA numeric string consisting can from the following characters: 123456789
alphaA string consisting of being able to following signs: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
sha1A SHA1 hash of the current timestamp and a random UNIQ ID
public static string reduce_double_slashes (string $str)
Removes duplicate slashes of a URL string.
The string whose content is to be checked for duplicate slashes. An example would be the following URL:
That string would be following after the function call:
public static string strip_quotes (string $str)
Remove single and double quotes from a string.
The content whose string is to be searched for single and double quotes.
public static string trim_slashes (string $str)
Removed at the beginning and at the end of each string Slash.
The slashes the string to be removed at the beginning and at the end.