Class \avadim\FastExcelWriter\RichText\RichText¶
- __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)
Parameters¶
string|array|null $fragments
__toString()¶
public function __toString(): string
Parameters¶
None
addTaggedText()¶
public function addTaggedText(string $text): RichText
Parameters¶
string $text
addText()¶
public function addText(string $text, $prop): RichText
Parameters¶
string $textmixed $prop
fragment()¶
public function fragment($num): RichTextFragment
Parameters¶
$num
fragments()¶
public function fragments(): array
Parameters¶
None
setBold()¶
public function setBold(): RichText
Parameters¶
None
setColor()¶
public function setColor(string $color): RichText
Parameters¶
string $color
setFont()¶
public function setFont(string $font): RichText
Parameters¶
string $font
setItalic()¶
public function setItalic(): RichText
Parameters¶
None
setSize()¶
public function setSize(int $size): RichText
Parameters¶
int $size
setUnderline()¶
public function setUnderline(?bool $double = false): RichText
Parameters¶
bool|null $double