PHP Class PhpOffice\PhpPresentation\Shape\RichText

Inheritance: extends PhpOffice\PhpPresentation\AbstractShape, implements PhpOffice\PhpPresentation\ComparableInterface
Show file Open project: phpoffice/phppowerpoint Class Usage Examples

Public Methods

Method Description
__construct ( ) Create a new \PhpOffice\PhpPresentation\Shape\RichText instance
__toString ( ) : string Convert to string
addText ( PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface $pText = null ) : RichText Add text
createBreak ( ) : BreakElement Create break
createParagraph ( ) : Paragraph Create paragraph
createText ( string $pText = '' ) : TextElement Create text (can not be formatted !)
createTextRun ( string $pText = '' ) : PhpOffice\PhpPresentation\Shape\RichText\Run Create text run (can be formatted)
getActiveParagraph ( ) : Paragraph Get active paragraph
getActiveParagraphIndex ( ) : integer Get active paragraph index
getAutoFit ( ) : string Get autofit
getColumns ( ) : integer Get columns
getFontScale ( ) : float Get pourcentage of fontScale
getHashCode ( ) : string Get hash code
getHorizontalOverflow ( ) : string Get horizontal overflow
getInsetBottom ( ) : float Get bottom inset
getInsetLeft ( ) : float Get left inset
getInsetRight ( ) : float Get right inset
getInsetTop ( ) : float Get top inset
getLineSpaceReduction ( ) : float Get pourcentage of the line space reduction
getParagraph ( integer $index ) : Paragraph Get paragraph
getParagraphs ( ) : Paragraph[] Get paragraphs
getPlainText ( ) : string Get plain text
getVerticalOverflow ( ) : string Get vertical overflow
getWrap ( ) : string Get text wrapping
hasAutoShrinkHorizontal ( ) : boolean Get horizontal auto shrink
hasAutoShrinkVertical ( ) : boolean Set vertical auto shrink
isUpright ( ) : boolean Get upright
isVertical ( ) : boolean Get vertical
setActiveParagraph ( integer $index ) : Paragraph Set active paragraph
setAutoFit ( $value = self::AUTOFIT_DEFAULT, $fontScale = null, $lnSpcReduction = null ) : RichText Set autofit
setAutoShrinkHorizontal ( boolean $value = null ) Set horizontal auto shrink
setAutoShrinkVertical ( boolean $value = null ) Set vertical auto shrink
setColumns ( $value = 1 ) : RichText Set columns
setHorizontalOverflow ( $value = self::OVERFLOW_OVERFLOW ) : RichText Set horizontal overflow
setInsetBottom ( $value = 4.8 ) : RichText Set bottom inset
setInsetLeft ( $value = 9.6 ) : RichText Set left inset
setInsetRight ( $value = 9.6 ) : RichText Set left inset
setInsetTop ( $value = 4.8 ) : RichText Set top inset
setParagraphs ( Paragraph[] $paragraphs = null ) : RichText Set paragraphs
setUpright ( $value = false ) : RichText Set vertical
setVertical ( $value = false ) : RichText Set vertical
setVerticalOverflow ( $value = self::OVERFLOW_OVERFLOW ) : RichText Set vertical overflow
setWrap ( $value = self::WRAP_SQUARE ) : RichText Set text wrapping

Method Details

__construct() public method

Create a new \PhpOffice\PhpPresentation\Shape\RichText instance
public __construct ( )

__toString() public method

Convert to string
public __toString ( ) : string
return string

addText() public method

Add text
public addText ( PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface $pText = null ) : RichText
$pText PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface Rich text element
return RichText

createBreak() public method

Create break
public createBreak ( ) : BreakElement
return PhpOffice\PhpPresentation\Shape\RichText\BreakElement

createParagraph() public method

Create paragraph
public createParagraph ( ) : Paragraph
return PhpOffice\PhpPresentation\Shape\RichText\Paragraph

createText() public method

Create text (can not be formatted !)
public createText ( string $pText = '' ) : TextElement
$pText string Text
return PhpOffice\PhpPresentation\Shape\RichText\TextElement

createTextRun() public method

Create text run (can be formatted)
public createTextRun ( string $pText = '' ) : PhpOffice\PhpPresentation\Shape\RichText\Run
$pText string Text
return PhpOffice\PhpPresentation\Shape\RichText\Run

getActiveParagraph() public method

Get active paragraph
public getActiveParagraph ( ) : Paragraph
return PhpOffice\PhpPresentation\Shape\RichText\Paragraph

getActiveParagraphIndex() public method

Get active paragraph index

getAutoFit() public method

Get autofit
public getAutoFit ( ) : string
return string

getColumns() public method

Get columns
public getColumns ( ) : integer
return integer

getFontScale() public method

Get pourcentage of fontScale
public getFontScale ( ) : float
return float

getHashCode() public method

Get hash code
public getHashCode ( ) : string
return string Hash code

getHorizontalOverflow() public method

Get horizontal overflow
public getHorizontalOverflow ( ) : string
return string

getInsetBottom() public method

Get bottom inset
public getInsetBottom ( ) : float
return float

getInsetLeft() public method

Get left inset
public getInsetLeft ( ) : float
return float

getInsetRight() public method

Get right inset
public getInsetRight ( ) : float
return float

getInsetTop() public method

Get top inset
public getInsetTop ( ) : float
return float

getLineSpaceReduction() public method

Get pourcentage of the line space reduction
public getLineSpaceReduction ( ) : float
return float

getParagraph() public method

Get paragraph
public getParagraph ( integer $index ) : Paragraph
$index integer
return PhpOffice\PhpPresentation\Shape\RichText\Paragraph

getParagraphs() public method

Get paragraphs
public getParagraphs ( ) : Paragraph[]
return PhpOffice\PhpPresentation\Shape\RichText\Paragraph[]

getPlainText() public method

Get plain text
public getPlainText ( ) : string
return string

getVerticalOverflow() public method

Get vertical overflow
public getVerticalOverflow ( ) : string
return string

getWrap() public method

Get text wrapping
public getWrap ( ) : string
return string

hasAutoShrinkHorizontal() public method

Get horizontal auto shrink

hasAutoShrinkVertical() public method

Set vertical auto shrink
public hasAutoShrinkVertical ( ) : boolean
return boolean

isUpright() public method

Get upright
public isUpright ( ) : boolean
return boolean

isVertical() public method

Get vertical
public isVertical ( ) : boolean
return boolean

setActiveParagraph() public method

Set active paragraph
public setActiveParagraph ( integer $index ) : Paragraph
$index integer
return PhpOffice\PhpPresentation\Shape\RichText\Paragraph

setAutoFit() public method

Set autofit
public setAutoFit ( $value = self::AUTOFIT_DEFAULT, $fontScale = null, $lnSpcReduction = null ) : RichText
$value string
$fontScale float
$lnSpcReduction float
return RichText

setAutoShrinkHorizontal() public method

Set horizontal auto shrink
public setAutoShrinkHorizontal ( boolean $value = null )
$value boolean

setAutoShrinkVertical() public method

Set vertical auto shrink
public setAutoShrinkVertical ( boolean $value = null )
$value boolean

setColumns() public method

Set columns
public setColumns ( $value = 1 ) : RichText
$value int
return RichText

setHorizontalOverflow() public method

Set horizontal overflow
public setHorizontalOverflow ( $value = self::OVERFLOW_OVERFLOW ) : RichText
$value string
return RichText

setInsetBottom() public method

Set bottom inset
public setInsetBottom ( $value = 4.8 ) : RichText
$value float
return RichText

setInsetLeft() public method

Set left inset
public setInsetLeft ( $value = 9.6 ) : RichText
$value float
return RichText

setInsetRight() public method

Set left inset
public setInsetRight ( $value = 9.6 ) : RichText
$value float
return RichText

setInsetTop() public method

Set top inset
public setInsetTop ( $value = 4.8 ) : RichText
$value float
return RichText

setParagraphs() public method

Set paragraphs
public setParagraphs ( Paragraph[] $paragraphs = null ) : RichText
$paragraphs PhpOffice\PhpPresentation\Shape\RichText\Paragraph[] Array of paragraphs
return RichText

setUpright() public method

Set vertical
public setUpright ( $value = false ) : RichText
$value boolean
return RichText

setVertical() public method

Set vertical
public setVertical ( $value = false ) : RichText
$value boolean
return RichText

setVerticalOverflow() public method

Set vertical overflow
public setVerticalOverflow ( $value = self::OVERFLOW_OVERFLOW ) : RichText
$value string
return RichText

setWrap() public method

Set text wrapping
public setWrap ( $value = self::WRAP_SQUARE ) : RichText
$value string
return RichText