PHP Class PhpOffice\PhpPresentation\Shape\RichText\Paragraph

Inheritance: implements PhpOffice\PhpPresentation\ComparableInterface
显示文件 Open project: phpoffice/phppowerpoint Class Usage Examples

Public Methods

Method Description
__construct ( ) Create a new \PhpOffice\PhpPresentation\Shape\RichText\Paragraph instance
__toString ( ) : string Convert to string
addText ( PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface $pText = null ) : Paragraph Add text
createBreak ( ) : BreakElement Create break
createText ( string $pText = '' ) : TextElement Create text (can not be formatted !)
createTextRun ( string $pText = '' ) : PhpOffice\PhpPresentation\Shape\RichText\Run Create text run (can be formatted)
getAlignment ( ) : Alignment Get alignment
getBulletStyle ( ) : Bullet Get bullet style
getFont ( ) : Font Get font
getHashCode ( ) : string Get hash code
getHashIndex ( ) : string Get hash index
getLineSpacing ( ) : integer
getPlainText ( ) : string Get plain text
getRichTextElements ( ) : PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface[] Get Rich Text elements
setAlignment ( Alignment $alignment ) : Paragraph Set alignment
setBulletStyle ( Bullet $style = null ) : Paragraph Set bullet style
setFont ( Font $pFont = null ) : Paragraph Set font
setHashIndex ( string $value ) Set hash index
setLineSpacing ( integer $lineSpacing ) : Paragraph
setRichTextElements ( PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface[] $pElements = null ) : Paragraph Set Rich Text elements

Method Details

__construct() public method

Create a new \PhpOffice\PhpPresentation\Shape\RichText\Paragraph 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 ) : Paragraph
$pText PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface Rich text element
return Paragraph

createBreak() public method

Create break
public createBreak ( ) : BreakElement
return BreakElement

createText() public method

Create text (can not be formatted !)
public createText ( string $pText = '' ) : TextElement
$pText string Text
return 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

getAlignment() public method

Get alignment
public getAlignment ( ) : Alignment
return PhpOffice\PhpPresentation\Style\Alignment

getBulletStyle() public method

Get bullet style
public getBulletStyle ( ) : Bullet
return PhpOffice\PhpPresentation\Style\Bullet

getFont() public method

Get font
public getFont ( ) : Font
return PhpOffice\PhpPresentation\Style\Font

getHashCode() public method

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

getHashIndex() public method

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
public getHashIndex ( ) : string
return string Hash index

getLineSpacing() public method

public getLineSpacing ( ) : integer
return integer

getPlainText() public method

Get plain text
public getPlainText ( ) : string
return string

getRichTextElements() public method

Get Rich Text elements
public getRichTextElements ( ) : PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface[]
return PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface[]

setAlignment() public method

Set alignment
public setAlignment ( Alignment $alignment ) : Paragraph
$alignment PhpOffice\PhpPresentation\Style\Alignment
return Paragraph

setBulletStyle() public method

Set bullet style
public setBulletStyle ( Bullet $style = null ) : Paragraph
$style PhpOffice\PhpPresentation\Style\Bullet
return Paragraph

setFont() public method

Set font
public setFont ( Font $pFont = null ) : Paragraph
$pFont PhpOffice\PhpPresentation\Style\Font Font
return Paragraph

setHashIndex() public method

Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
public setHashIndex ( string $value )
$value string Hash index

setLineSpacing() public method

public setLineSpacing ( integer $lineSpacing ) : Paragraph
$lineSpacing integer
return Paragraph

setRichTextElements() public method

Set Rich Text elements
public setRichTextElements ( PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface[] $pElements = null ) : Paragraph
$pElements PhpOffice\PhpPresentation\Shape\RichText\TextElementInterface[] Array of elements
return Paragraph