Cell
in package
implements
ComparableInterface
Table cell.
Table of Contents
Interfaces
- ComparableInterface
- PhpOffice\PhpPresentation\ComparableInterface.
Properties
- $activeParagraph : int
- Active paragraph.
- $borders : Borders
- Borders.
- $colSpan : int
- Colspan.
- $fill : Fill
- Fill.
- $hashIndex : int
- Hash index.
- $richTextParagraphs : array<string|int, Paragraph>
- Rich text paragraphs.
- $rowSpan : int
- Rowspan.
- $width : int
- Width (in pixels).
Methods
- __construct() : mixed
- Create a new \PhpOffice\PhpPresentation\Shape\RichText instance.
- __toString() : string
- Convert to string.
- addText() : Cell
- Add text.
- createBreak() : BreakElement
- Create break.
- createParagraph() : Paragraph
- Create paragraph.
- createText() : TextElement
- Create text (can not be formatted !).
- createTextRun() : Run
- Create text run (can be formatted).
- getActiveParagraph() : Paragraph
- Get active paragraph.
- getActiveParagraphIndex() : int
- Get active paragraph index.
- getBorders() : Borders
- Get borders.
- getColSpan() : int
- getFill() : Fill
- Get fill.
- getHashCode() : string
- Get hash code.
- getHashIndex() : null|int
- Get hash index.
- getParagraph() : Paragraph
- Get paragraph.
- getParagraphs() : array<string|int, Paragraph>
- Get paragraphs.
- getPlainText() : string
- Get plain text.
- getRowSpan() : int
- getWidth() : int
- Get width.
- setActiveParagraph() : Paragraph
- Set active paragraph.
- setBorders() : Cell
- Set borders.
- setColSpan() : self
- setFill() : Cell
- Set fill.
- setHashIndex() : $this
- Set hash index.
- setParagraphs() : self
- Set paragraphs.
- setRowSpan() : self
- setWidth() : self
- Set width.
Properties
$activeParagraph
Active paragraph.
private
int
$activeParagraph
= 0
$borders
Borders.
private
Borders
$borders
$colSpan
Colspan.
private
int
$colSpan
= 0
$fill
Fill.
private
Fill
$fill
$hashIndex
Hash index.
private
int
$hashIndex
$richTextParagraphs
Rich text paragraphs.
private
array<string|int, Paragraph>
$richTextParagraphs
$rowSpan
Rowspan.
private
int
$rowSpan
= 0
$width
Width (in pixels).
private
int
$width
= 0
Methods
__construct()
Create a new \PhpOffice\PhpPresentation\Shape\RichText instance.
public
__construct() : mixed
__toString()
Convert to string.
public
__toString() : string
Return values
stringaddText()
Add text.
public
addText([TextElementInterface $pText = null ]) : Cell
Parameters
- $pText : TextElementInterface = null
-
Rich text element
Return values
CellcreateBreak()
Create break.
public
createBreak() : BreakElement
Return values
BreakElementcreateParagraph()
Create paragraph.
public
createParagraph() : Paragraph
Return values
ParagraphcreateText()
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
RungetActiveParagraph()
Get active paragraph.
public
getActiveParagraph() : Paragraph
Return values
ParagraphgetActiveParagraphIndex()
Get active paragraph index.
public
getActiveParagraphIndex() : int
Return values
intgetBorders()
Get borders.
public
getBorders() : Borders
Return values
BordersgetColSpan()
public
getColSpan() : int
Return values
intgetFill()
Get fill.
public
getFill() : Fill
Return values
FillgetHashCode()
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
getParagraph()
Get paragraph.
public
getParagraph([int $index = 0 ]) : Paragraph
Parameters
- $index : int = 0
Return values
ParagraphgetParagraphs()
Get paragraphs.
public
getParagraphs() : array<string|int, Paragraph>
Return values
array<string|int, Paragraph>getPlainText()
Get plain text.
public
getPlainText() : string
Return values
stringgetRowSpan()
public
getRowSpan() : int
Return values
intgetWidth()
Get width.
public
getWidth() : int
Return values
intsetActiveParagraph()
Set active paragraph.
public
setActiveParagraph([int $index = 0 ]) : Paragraph
Parameters
- $index : int = 0
Return values
ParagraphsetBorders()
Set borders.
public
setBorders(Borders $borders) : Cell
Parameters
- $borders : Borders
Return values
CellsetColSpan()
public
setColSpan([int $value = 0 ]) : self
Parameters
- $value : int = 0
Return values
selfsetFill()
Set fill.
public
setFill(Fill $fill) : Cell
Parameters
- $fill : Fill
Return values
CellsetHashIndex()
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
$thissetParagraphs()
Set paragraphs.
public
setParagraphs([array<string|int, Paragraph> $paragraphs = [] ]) : self
Parameters
- $paragraphs : array<string|int, Paragraph> = []
-
Array of paragraphs
Return values
selfsetRowSpan()
public
setRowSpan([int $value = 0 ]) : self
Parameters
- $value : int = 0
Return values
selfsetWidth()
Set width.
public
setWidth([int $pValue = 0 ]) : self
Parameters
- $pValue : int = 0