ContentParser
in package
Class ContentParser.
Tags
Table of Contents
Constants
- BOLD_CONTENT = '<b>%s</b>'
- LINK_CONTENT = "<a href='%s' target='%s' id='%d' type='%s'>%s</a>"
Properties
- $content : string
- $parseUrl : bool
- $parseUserFullLink : bool
- $pattern : string
- $target : string
- $userCollection : Collection
Methods
- attributeParser() : void
- getContent() : string
- getPattern() : string
- getTarget() : string
- getUserCollection() : Collection
- isParseUrl() : bool
- isParseUserFullLink() : bool
- parse() : string|null
- setContent() : void
- setParseUrl() : void
- setParseUserFullLink() : void
- setPattern() : void
- setTarget() : void
- setUserCollection() : void
Constants
BOLD_CONTENT
public
mixed
BOLD_CONTENT
= '<b>%s</b>'
LINK_CONTENT
public
mixed
LINK_CONTENT
= "<a href='%s' target='%s' id='%d' type='%s'>%s</a>"
Properties
$content
protected
string
$content
$parseUrl
protected
bool
$parseUrl
$parseUserFullLink
protected
bool
$parseUserFullLink
$pattern
protected
string
$pattern
$target
protected
string
$target
$userCollection
protected
Collection
$userCollection
Methods
attributeParser()
public
attributeParser(array<string|int, mixed> $attribute) : void
Parameters
- $attribute : array<string|int, mixed>
getContent()
public
getContent() : string
Return values
stringgetPattern()
public
getPattern() : string
Return values
stringgetTarget()
public
getTarget() : string
Return values
stringgetUserCollection()
public
getUserCollection() : Collection
Return values
CollectionisParseUrl()
public
isParseUrl() : bool
Return values
boolisParseUserFullLink()
public
isParseUserFullLink() : bool
Return values
boolparse()
public
parse() : string|null
Return values
string|nullsetContent()
public
setContent(string $content) : void
Parameters
- $content : string
setParseUrl()
public
setParseUrl([bool $parseUrl = true ]) : void
Parameters
- $parseUrl : bool = true
setParseUserFullLink()
public
setParseUserFullLink([bool $parseUserFullLink = false ]) : void
Parameters
- $parseUserFullLink : bool = false
setPattern()
public
setPattern(string $pattern) : void
Parameters
- $pattern : string
setTarget()
public
setTarget([string $target = '_self' ]) : void
Parameters
- $target : string = '_self'
setUserCollection()
public
setUserCollection(Collection $userCollection) : void
Parameters
- $userCollection : Collection