Class \avadim\FastExcelWriter\RichText\RichText
On this page
- __construct() – RichText constructor
- __toString()
- addTaggedText() – Add tagged text (, , ,
, ,) - addText() – Add a text fragment
- fragment() – Get fragment by its index
- fragments() – Get all fragments
- setBold() – Set bold font for the last added fragment
- setColor() – Set font color for the last added fragment
- setFont() – Set font name for the last added fragment
- setItalic() – Set italic font for the last added fragment
- setSize() – Set font size for the last added fragment
- setUnderline() – Set underline for the last added fragment
__construct()
public function __construct($fragments)
RichText constructor
Parameters
string|array|null $fragments
__toString()
public function __toString(): string
Parameters
None
addTaggedText()
public function addTaggedText(string $text): RichText
Add tagged text (, , , ,
Parameters
string $text
addText()
public function addText(string $text, $prop): RichText
Add a text fragment
Parameters
string $textmixed $prop
fragment()
public function fragment($num): RichTextFragment
Get fragment by its index
Parameters
$num
fragments()
public function fragments(): array
Get all fragments
Parameters
None
setBold()
public function setBold(): RichText
Set bold font for the last added fragment
Parameters
None
setColor()
public function setColor(string $color): RichText
Set font color for the last added fragment
Parameters
string $color
setFont()
public function setFont(string $font): RichText
Set font name for the last added fragment
Parameters
string $font
setItalic()
public function setItalic(): RichText
Set italic font for the last added fragment
Parameters
None
setSize()
public function setSize(int $size): RichText
Set font size for the last added fragment
Parameters
int $size
setUnderline()
public function setUnderline(?bool $double = false): RichText
Set underline for the last added fragment
Parameters
bool|null $double