Paragraph
in package
implements
ComparableInterface
\PhpOffice\PhpPresentation\Shape\RichText\Paragraph.
Table of Contents
Interfaces
- ComparableInterface
- PhpOffice\PhpPresentation\ComparableInterface.
Constants
- LINE_SPACING_MODE_PERCENT = 'percent'
- LINE_SPACING_MODE_POINT = 'point'
Properties
- $alignment : Alignment
- Alignment.
- $bulletStyle : Bullet
- Bullet style.
- $font : null|Font
- Font.
- $hashIndex : int
- Hash index.
- $lineSpacing : int
- $lineSpacingMode : string
- $richTextElements : array<string|int, TextElementInterface>
- Rich text elements.
- $spacingAfter : int
- $spacingBefore : int
Methods
- __clone() : mixed
- Magic Method : clone.
- __construct() : mixed
- Create a new \PhpOffice\PhpPresentation\Shape\RichText\Paragraph instance.
- __toString() : string
- Convert to string.
- addText() : self
- Add text.
- createBreak() : BreakElement
- Create break.
- createText() : TextElement
- Create text (can not be formatted !).
- createTextRun() : Run
- Create text run (can be formatted).
- getAlignment() : Alignment
- Get alignment.
- getBulletStyle() : Bullet|null
- Get bullet style.
- getFont() : Font|null
- Get font.
- getHashCode() : string
- Get hash code.
- getHashIndex() : null|int
- Get hash index.
- getLineSpacing() : int
- getLineSpacingMode() : string
- getPlainText() : string
- Get plain text.
- getRichTextElements() : array<string|int, TextElementInterface>
- Get Rich Text elements.
- getSpacingAfter() : int
- Value in points.
- getSpacingBefore() : int
- Value in points.
- setAlignment() : self
- Set alignment.
- setBulletStyle() : self
- Set bullet style.
- setFont() : self
- Set font.
- setHashIndex() : $this
- Set hash index.
- setLineSpacing() : self
- Value in points.
- setLineSpacingMode() : self
- setRichTextElements() : self
- Set Rich Text elements.
- setSpacingAfter() : self
- Value in points.
- setSpacingBefore() : self
- Value in points.
Constants
LINE_SPACING_MODE_PERCENT
public
mixed
LINE_SPACING_MODE_PERCENT
= 'percent'
LINE_SPACING_MODE_POINT
public
mixed
LINE_SPACING_MODE_POINT
= 'point'
Properties
$alignment
Alignment.
private
Alignment
$alignment
$bulletStyle
Bullet style.
private
Bullet
$bulletStyle
$font
Font.
private
null|Font
$font
$hashIndex
Hash index.
private
int
$hashIndex
$lineSpacing
private
int
$lineSpacing
= 100
$lineSpacingMode
private
string
$lineSpacingMode
= self::LINE_SPACING_MODE_PERCENT
$richTextElements
Rich text elements.
private
array<string|int, TextElementInterface>
$richTextElements
= []
$spacingAfter
private
int
$spacingAfter
= 0
$spacingBefore
private
int
$spacingBefore
= 0
Methods
__clone()
Magic Method : clone.
public
__clone() : mixed
__construct()
Create a new \PhpOffice\PhpPresentation\Shape\RichText\Paragraph instance.
public
__construct() : mixed
__toString()
Convert to string.
public
__toString() : string
Return values
stringaddText()
Add text.
public
addText([null|TextElementInterface $pText = null ]) : self
Parameters
- $pText : null|TextElementInterface = null
-
Rich text element
Return values
selfcreateBreak()
Create break.
public
createBreak() : BreakElement
Return values
BreakElementcreateText()
Create text (can not be formatted !).
public
createText([string $pText = '' ]) : TextElement
Parameters
- $pText : string = ''
-
Text
Return values
TextElementcreateTextRun()
Create text run (can be formatted).
public
createTextRun([string $pText = '' ]) : Run
Parameters
- $pText : string = ''
-
Text
Return values
RungetAlignment()
Get alignment.
public
getAlignment() : Alignment
Return values
AlignmentgetBulletStyle()
Get bullet style.
public
getBulletStyle() : Bullet|null
Return values
Bullet|nullgetFont()
Get font.
public
getFont() : Font|null
Return values
Font|nullgetHashCode()
Get hash code.
public
getHashCode() : string
Return values
string —Hash code
getHashIndex()
Get hash index.
public
getHashIndex() : null|int
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.
Return values
null|int —Hash index
getLineSpacing()
public
getLineSpacing() : int
Return values
intgetLineSpacingMode()
public
getLineSpacingMode() : string
Return values
stringgetPlainText()
Get plain text.
public
getPlainText() : string
Return values
stringgetRichTextElements()
Get Rich Text elements.
public
getRichTextElements() : array<string|int, TextElementInterface>
Return values
array<string|int, TextElementInterface>getSpacingAfter()
Value in points.
public
getSpacingAfter() : int
Return values
intgetSpacingBefore()
Value in points.
public
getSpacingBefore() : int
Return values
intsetAlignment()
Set alignment.
public
setAlignment(Alignment $alignment) : self
Parameters
- $alignment : Alignment
Return values
selfsetBulletStyle()
Set bullet style.
public
setBulletStyle([Bullet|null $style = null ]) : self
Parameters
- $style : Bullet|null = null
Return values
selfsetFont()
Set font.
public
setFont([null|Font $pFont = null ]) : self
Parameters
- $pFont : null|Font = null
-
Font
Return values
selfsetHashIndex()
Set hash index.
public
setHashIndex(int $value) : $this
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.
Parameters
- $value : int
-
Hash index
Return values
$thissetLineSpacing()
Value in points.
public
setLineSpacing(int $lineSpacing) : self
Parameters
- $lineSpacing : int
Return values
selfsetLineSpacingMode()
public
setLineSpacingMode(string $lineSpacingMode) : self
Parameters
- $lineSpacingMode : string
Return values
selfsetRichTextElements()
Set Rich Text elements.
public
setRichTextElements([array<string|int, TextElementInterface> $pElements = [] ]) : self
Parameters
- $pElements : array<string|int, TextElementInterface> = []
-
Array of elements
Return values
selfsetSpacingAfter()
Value in points.
public
setSpacingAfter(int $spacingAfter) : self
Parameters
- $spacingAfter : int
Return values
selfsetSpacingBefore()
Value in points.
public
setSpacingBefore(int $spacingBefore) : self
Parameters
- $spacingBefore : int