Output
    
            
            in package
            
        
    
            
            implements
                            Output                    
    
    
Table of Contents
Interfaces
Constants
- HASHTAG_LINK = '<a href="%s">%s</a>'
 - HASHTAG_REGEX = '(#[^\\s!@#$%^&*()=\\-+.\\/,\\[{\\]};:\'"?><]+)'
 - PARSE_URL_IGNORE_TAGS = 'head|link|a|script|style|code|pre|select|textarea|button'
 - TEXT_NEW_LINE_REGEX = '@<(\\/p|br)>@'
 - TOPIC_REGEX = '(##[^!@#$%^&*()=\\-+.\\/,\\[{\\]};:\'"?><]+[^\\r\\n\\t\\f\\v]+)'
 - URL_POPULAR_DOMAIN_REGEX = '@\\w+\\.(com|gov|vn|net)$@'
 - URL_REGEX = '@(http(s)?)?(:\\/\\/)?(([a-zA-Z0-9]+)([-\\w]*\\.)*([-\\w]+\\.[a-zA-Z]{1,})([\\w=%]+\\S*)+)@'
 
Methods
- buildHashtagLink() : string
 - cleanScriptTag() : string
 - cleanStyleTag() : string
 - getDescription() : string
 - Get short description from a string.
 - getHashtags() : array<string|int, string>
 - handleNewLineTag() : 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
 - isValidLink() : bool
 
Constants
HASHTAG_LINK
    public
        mixed
    HASHTAG_LINK
    = '<a href="%s">%s</a>'
    
    
    
HASHTAG_REGEX
    public
        mixed
    HASHTAG_REGEX
    = '(#[^\\s!@#$%^&*()=\\-+.\\/,\\[{\\]};:\'"?><]+)'
    
    
    
PARSE_URL_IGNORE_TAGS
    public
        mixed
    PARSE_URL_IGNORE_TAGS
    = 'head|link|a|script|style|code|pre|select|textarea|button'
    
    
    
TEXT_NEW_LINE_REGEX
    public
        mixed
    TEXT_NEW_LINE_REGEX
    = '@<(\\/p|br)>@'
    
    
    
TOPIC_REGEX
    public
        mixed
    TOPIC_REGEX
    = '(##[^!@#$%^&*()=\\-+.\\/,\\[{\\]};:\'"?><]+[^\\r\\n\\t\\f\\v]+)'
    
    
    
URL_POPULAR_DOMAIN_REGEX
    public
        mixed
    URL_POPULAR_DOMAIN_REGEX
    = '@\\w+\\.(com|gov|vn|net)$@'
    
    
    
URL_REGEX
    public
        mixed
    URL_REGEX
    = '@(http(s)?)?(:\\/\\/)?(([a-zA-Z0-9]+)([-\\w]*\\.)*([-\\w]+\\.[a-zA-Z]{1,})([\\w=%]+\\S*)+)@'
    
    
    
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
    Parameters
- $string : string|null
 - $limit : int = MetaFoxConstant::CHARACTER_LIMIT
 - $end : string = '...'
 
Tags
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>handleNewLineTag()
    public
                    handleNewLineTag(string $string) : string
    Parameters
- $string : string
 
Return values
stringisAllowHtml()
    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 = '...'
 
Tags
Return values
stringlinkify()
    public
                    linkify(string|null $string) : string
    Parameters
- $string : string|null
 
Tags
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
 - 
                    
$string
 - $options : array<string, mixed> = []
 
Tags
Return values
stringisValidLink()
    private
                    isValidLink(string $string) : bool
    Parameters
- $string : string