UrlItem implements RestEntity
Table of Contents
Interfaces
Methods
- __construct() : mixed
- getByMessage() : self|null
- getFirstUrlFromText() : string|null
- getId() : int|null
- Returns the id of the entity
- getMetadata() : array<string|int, mixed>
- getRestEntityName() : string
- Returns the name of the entity that will be used in the rest response
- getRichData() : RichData
- getUrl() : string
- getUrlAttach() : CIMMessageParamAttach|null
- getUrlsFromText() : array<string|int, string>
- initByMetadata() : self
- initByPreviewUrlId() : self|null
- isDynamicUrl() : bool
- isRich() : bool
- isStaticUrl() : bool
- setMetadata() : self
- setRichData() : self
- setUrl() : self
- setUrlAttach() : self
- toRestFormat() : array<string|int, mixed>|null
- Returns an array in JSON like format to return the entity as a rest response.
Methods
__construct()
public
__construct([string|null $url = null ][, bool $withFetchMetadata = true ]) : mixed
Parameters
- $url : string|null = null
- $withFetchMetadata : bool = true
getByMessage()
public
static getByMessage(Message $message) : self|null
Parameters
- $message : Message
Return values
self|nullgetFirstUrlFromText()
public
static getFirstUrlFromText(string|null $text) : string|null
Parameters
- $text : string|null
Return values
string|nullgetId()
Returns the id of the entity
public
getId() : int|null
Return values
int|nullgetMetadata()
public
getMetadata() : array<string|int, mixed>
Return values
array<string|int, mixed>getRestEntityName()
Returns the name of the entity that will be used in the rest response
public
static getRestEntityName() : string
Return values
stringgetRichData()
public
getRichData() : RichData
Return values
RichDatagetUrl()
public
getUrl() : string
Return values
stringgetUrlAttach()
public
getUrlAttach() : CIMMessageParamAttach|null
Return values
CIMMessageParamAttach|nullgetUrlsFromText()
public
static getUrlsFromText(string|null $text) : array<string|int, string>
Parameters
- $text : string|null
Return values
array<string|int, string>initByMetadata()
public
static initByMetadata(array<string|int, mixed> $metadata) : self
Parameters
- $metadata : array<string|int, mixed>
Return values
selfinitByPreviewUrlId()
public
static initByPreviewUrlId(int $previewUrlId[, bool $withHtml = true ]) : self|null
Parameters
- $previewUrlId : int
- $withHtml : bool = true
Return values
self|nullisDynamicUrl()
public
isDynamicUrl() : bool
Return values
boolisRich()
public
isRich() : bool
Return values
boolisStaticUrl()
public
isStaticUrl() : bool
Return values
boolsetMetadata()
public
setMetadata(array<string|int, mixed> $metadata) : self
Parameters
- $metadata : array<string|int, mixed>
Return values
selfsetRichData()
public
setRichData(RichData|null $richData) : self
Parameters
- $richData : RichData|null
Return values
selfsetUrl()
public
setUrl(string $url) : self
Parameters
- $url : string
Return values
selfsetUrlAttach()
public
setUrlAttach(CIMMessageParamAttach|null $urlAttach) : self
Parameters
- $urlAttach : CIMMessageParamAttach|null
Return values
selftoRestFormat()
Returns an array in JSON like format to return the entity as a rest response.
public
toRestFormat([array<string|int, mixed> $option = [] ]) : array<string|int, mixed>|null
Parameters
- $option : array<string|int, mixed> = []