\PhpOffice\PhpSpreadsheet\RichTextRichText

Summary

Methods
Properties
Constants
__construct()
addText()
createText()
createTextRun()
getPlainText()
__toString()
getRichTextElements()
setRichTextElements()
getHashCode()
__clone()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$richTextElements
N/A

Properties

$richTextElements

$richTextElements : \PhpOffice\PhpSpreadsheet\RichText\ITextElement[]

Rich text elements.

Type

ITextElement[]

Methods

__construct()

__construct(\PhpOffice\PhpSpreadsheet\Cell\Cell  $pCell = null) : mixed

Create a new RichText instance.

Parameters

\PhpOffice\PhpSpreadsheet\Cell\Cell $pCell

Returns

mixed —

addText()

addText(\PhpOffice\PhpSpreadsheet\RichText\ITextElement  $pText) : $this

Add text.

Parameters

\PhpOffice\PhpSpreadsheet\RichText\ITextElement $pText

Rich text element

Returns

$this —

createText()

createText(string  $pText) : \PhpOffice\PhpSpreadsheet\RichText\TextElement

Create text.

Parameters

string $pText

Text

Returns

\PhpOffice\PhpSpreadsheet\RichText\TextElement —

createTextRun()

createTextRun(string  $pText) : \PhpOffice\PhpSpreadsheet\RichText\Run

Create text run.

Parameters

string $pText

Text

Returns

\PhpOffice\PhpSpreadsheet\RichText\Run —

getPlainText()

getPlainText() : string

Get plain text.

Returns

string —

__toString()

__toString() : string

Convert to string.

Returns

string —

getRichTextElements()

getRichTextElements() : \PhpOffice\PhpSpreadsheet\RichText\ITextElement[]

Get Rich Text elements.

Returns

\PhpOffice\PhpSpreadsheet\RichText\ITextElement[] —

setRichTextElements()

setRichTextElements(\PhpOffice\PhpSpreadsheet\RichText\ITextElement[]  $textElements) : $this

Set Rich Text elements.

Parameters

\PhpOffice\PhpSpreadsheet\RichText\ITextElement[] $textElements

Array of elements

Returns

$this —

getHashCode()

getHashCode() : string

Get hash code.

Returns

string —

Hash code

__clone()

__clone() : mixed

Implement PHP __clone to create a deep clone, not just a shallow copy.

Returns

mixed —