\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

Methods

__construct()

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

Create a new RichText instance.

Parameters

\PhpOffice\PhpSpreadsheet\Cell\Cell $pCell

Throws

\PhpOffice\PhpSpreadsheet\Exception

createText()

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

Create text.

Parameters

string $pText

Text

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

\PhpOffice\PhpSpreadsheet\RichText\TextElement

createTextRun()

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

Create text run.

Parameters

string $pText

Text

Throws

\PhpOffice\PhpSpreadsheet\Exception

Returns

\PhpOffice\PhpSpreadsheet\RichText\Run

getPlainText()

getPlainText() : string

Get plain text.

Returns

string

__toString()

__toString() : string

Convert to string.

Returns

string

setRichTextElements()

setRichTextElements(array<mixed,\PhpOffice\PhpSpreadsheet\RichText\ITextElement>  $textElements) : $this

Set Rich Text elements.

Parameters

array<mixed,\PhpOffice\PhpSpreadsheet\RichText\ITextElement> $textElements

Array of elements

Returns

$this

getHashCode()

getHashCode() : string

Get hash code.

Returns

string —

Hash code

__clone()

__clone() 

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