RichText
in package
implements
IComparable, Stringable
Table of Contents
Interfaces
- IComparable
- Stringable
Properties
- $richTextElements : array<string|int, ITextElement>
- Rich text elements.
Methods
- __clone() : mixed
- Implement PHP __clone to create a deep clone, not just a shallow copy.
- __construct() : mixed
- Create a new RichText instance.
- __toString() : string
- Convert to string.
- addText() : $this
- Add text.
- createText() : TextElement
- Create text.
- createTextRun() : Run
- Create text run.
- getHashCode() : string
- Get hash code.
- getPlainText() : string
- Get plain text.
- getRichTextElements() : array<string|int, ITextElement>
- Get Rich Text elements.
- setRichTextElements() : $this
- Set Rich Text elements.
Properties
$richTextElements
Rich text elements.
private
array<string|int, ITextElement>
$richTextElements
Methods
__clone()
Implement PHP __clone to create a deep clone, not just a shallow copy.
public
__clone() : mixed
__construct()
Create a new RichText instance.
public
__construct([Cell|null $cell = null ]) : mixed
Parameters
- $cell : Cell|null = null
__toString()
Convert to string.
public
__toString() : string
Return values
stringaddText()
Add text.
public
addText(ITextElement $text) : $this
Parameters
- $text : ITextElement
-
Rich text element
Return values
$thiscreateText()
Create text.
public
createText(string $text) : TextElement
Parameters
- $text : string
-
Text
Return values
TextElementcreateTextRun()
Create text run.
public
createTextRun(string $text) : Run
Parameters
- $text : string
-
Text
Return values
RungetHashCode()
Get hash code.
public
getHashCode() : string
Return values
string —Hash code
getPlainText()
Get plain text.
public
getPlainText() : string
Return values
stringgetRichTextElements()
Get Rich Text elements.
public
getRichTextElements() : array<string|int, ITextElement>
Return values
array<string|int, ITextElement>setRichTextElements()
Set Rich Text elements.
public
setRichTextElements(array<string|int, ITextElement> $textElements) : $this
Parameters
- $textElements : array<string|int, ITextElement>
-
Array of elements