Output
in
Table of Contents
Methods
- buildHashtagLink() : string
- cleanScriptTag() : string
- cleanStyleTag() : string
- getDescription() : string
- Get short description from a string.
- getHashtags() : array<string|int, string>
- isAllowHtml() : bool
- limit() : string
- Shorten the provided string to the specified limitation, including the length of the delimiter.
- linkify() : string
- maskedEmail() : string|null
- parse() : string
- Text we need to parse, usually text added via a <textarea>.
- parseUrl() : string
Methods
buildHashtagLink()
public
buildHashtagLink(string|null $string, string $uri[, string|null $templateRegex = null ]) : string
Parameters
- $string : string|null
- $uri : string
- $templateRegex : string|null = null
Return values
stringcleanScriptTag()
public
cleanScriptTag(string|null $string) : string
Parameters
- $string : string|null
Return values
stringcleanStyleTag()
public
cleanStyleTag(string|null $string) : string
Parameters
- $string : string|null
Return values
stringgetDescription()
Get short description from a string.
public
getDescription(string|null $string[, int $limit = MetaFoxConstant::CHARACTER_LIMIT ][, string $end = '...' ]) : string
The string will be shorten by number of characters declared in $limit (default: 155 chars) and all html tags will be stripped out.
Parameters
- $string : string|null
- $limit : int = MetaFoxConstant::CHARACTER_LIMIT
- $end : string = '...'
Return values
stringgetHashtags()
public
getHashtags(string|null $text[, bool $allowSpace = false ]) : array<string|int, string>
Parameters
- $text : string|null
- $allowSpace : bool = false
Tags
Return values
array<string|int, string>isAllowHtml()
public
isAllowHtml() : bool
Return values
boollimit()
Shorten the provided string to the specified limitation, including the length of the delimiter.
public
limit(string|null $string[, int $limit = MetaFoxConstant::CHARACTER_LIMIT ][, string $delimiter = '...' ]) : string
Parameters
- $string : string|null
-
$string the string we need to limit
- $limit : int = MetaFoxConstant::CHARACTER_LIMIT
-
the maximum number of characters allowed
- $delimiter : string = '...'
Return values
stringlinkify()
public
linkify(string|null $string) : string
Parameters
- $string : string|null
Return values
stringmaskedEmail()
public
maskedEmail(string|null $email[, int $left = 3 ]) : string|null
Parameters
- $email : string|null
- $left : int = 3
Return values
string|nullparse()
Text we need to parse, usually text added via a <textarea>.
public
parse(string|null $string) : string
Parameters
- $string : string|null
-
$string the string we need to parse
Return values
stringparseUrl()
public
parseUrl(string|null $string[, array<string, mixed> $options = [] ]) : string
Parameters
- $string : string|null
- $options : array<string, mixed> = []