MetaFox

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

public buildHashtagLink(string|null $string, string $uri[, string|null $templateRegex = null ]) : string
Parameters
$string : string|null
$uri : string
$templateRegex : string|null = null
Return values
string

cleanScriptTag()

public cleanScriptTag(string|null $string) : string
Parameters
$string : string|null
Return values
string

cleanStyleTag()

public cleanStyleTag(string|null $string) : string
Parameters
$string : string|null
Return values
string

getDescription()

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
string

getHashtags()

public getHashtags(string|null $text[, bool $allowSpace = false ]) : array<string|int, string>
Parameters
$text : string|null
$allowSpace : bool = false
Tags
SuppressWarnings

(PHPMD.BooleanArgumentFlag)

Return values
array<string|int, string>

isAllowHtml()

public isAllowHtml() : bool
Return values
bool

limit()

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
string

linkify()

public linkify(string|null $string) : string
Parameters
$string : string|null
Return values
string

maskedEmail()

public maskedEmail(string|null $email[, int $left = 3 ]) : string|null
Parameters
$email : string|null
$left : int = 3
Return values
string|null

parse()

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
string

parseUrl()

public parseUrl(string|null $string[, array<string, mixed> $options = [] ]) : string
Parameters
$string : string|null
$options : array<string, mixed> = []
Return values
string

        
On this page

Search results