Documentation

TableCell extends AbstractStringContainerBlock
in package
implements InlineContainerInterface

Block-level element

Interfaces, Classes and Traits

InlineContainerInterface
Interface for a block which can contain line(s) of strings

Table of Contents

ALIGN_CENTER  = 'center'
ALIGN_LEFT  = 'left'
ALIGN_RIGHT  = 'right'
TYPE_BODY  = 'td'
TYPE_HEAD  = 'th'
$align  : string|null
$data  : array<string, mixed>
Used for storage of arbitrary data.
$type  : string
$depth  : int
$endLine  : int
$finalStringContents  : string
$firstChild  : Node|null
$lastChild  : Node|null
$lastLineBlank  : bool
$next  : Node|null
$open  : bool
$parent  : Node|null
$previous  : Node|null
$startLine  : int
$strings  : ArrayCollection<int, string>
__clone()  : mixed
Clone the current node and its children
__construct()  : mixed
Constructor
addLine()  : void
appendChild()  : void
canContain()  : bool
children()  : array<string|int, Node>
children()  :
detach()  : void
detachChildren()  : void
Detaches all child nodes of given node
endsWithBlankLine()  : bool
Whether the block ends with a blank line
finalize()  : void
Finalize the block; mark it closed for modification
firstChild()  : Node|null
getData()  : mixed
getDepth()  : int
getEndLine()  : int
getStartLine()  : int
getStringContent()  : string
handleRemainingContents()  : void
hasChildren()  : bool
insertAfter()  : void
Inserts the $sibling node after $this
insertBefore()  : void
Inserts the $sibling node before $this
isCode()  : bool
isContainer()  : bool
isOpen()  : bool
Whether the block is open for modifications
lastChild()  : Node|null
matchesNextLine()  : bool
next()  : Node|null
parent()  : Node|null
parent()  :
prependChild()  : void
Adds $child as the very first child of $this
previous()  : Node|null
replaceChildren()  : $this
Replace all children of given node with collection of another
replaceWith()  : void
setEndLine()  : $this
setLastLineBlank()  : void
setStartLine()  : $this
shouldLastLineBeBlank()  : bool
Determines whether the last line should be marked as blank
walker()  : NodeWalker
setParent()  : void

Constants

ALIGN_CENTER

public mixed ALIGN_CENTER = 'center'

ALIGN_RIGHT

public mixed ALIGN_RIGHT = 'right'

Properties

$data

Used for storage of arbitrary data.

public array<string, mixed> $data = []

$depth

protected int $depth = 0

Methods

__clone()

Clone the current node and its children

public __clone() : mixed

WARNING: This is a recursive function and should not be called on deeply-nested node trees!

Return values
mixed

__construct()

Constructor

public __construct([string $string = '' ][, string $type = self::TYPE_BODY ][, string $align = null ]) : mixed
Parameters
$string : string = ''
$type : string = self::TYPE_BODY
$align : string = null
Return values
mixed

appendChild()

public appendChild(Node $child) : void
Parameters
$child : Node
Return values
void

children()

public children() : array<string|int, Node>
Return values
array<string|int, Node>

detach()

public detach() : void
Return values
void

detachChildren()

Detaches all child nodes of given node

public detachChildren() : void
Return values
void

endsWithBlankLine()

Whether the block ends with a blank line

public endsWithBlankLine() : bool
Return values
bool

firstChild()

public firstChild() : Node|null
Return values
Node|null

getData()

public getData(string $key[, mixed $default = null ]) : mixed
Parameters
$key : string
$default : mixed = null
Return values
mixed

getDepth()

public getDepth() : int
Return values
int

getEndLine()

public getEndLine() : int
Return values
int

getStartLine()

public getStartLine() : int
Return values
int

hasChildren()

public hasChildren() : bool
Return values
bool

insertAfter()

Inserts the $sibling node after $this

public insertAfter(Node $sibling) : void
Parameters
$sibling : Node
Return values
void

insertBefore()

Inserts the $sibling node before $this

public insertBefore(Node $sibling) : void
Parameters
$sibling : Node
Return values
void

isCode()

public isCode() : bool
Return values
bool

isContainer()

public abstract isContainer() : bool
Return values
bool

isOpen()

Whether the block is open for modifications

public isOpen() : bool
Return values
bool

lastChild()

public lastChild() : Node|null
Return values
Node|null

matchesNextLine()

public matchesNextLine(Cursor $cursor) : bool
Parameters
$cursor : Cursor
Return values
bool

parent()

public parent() : Node|null
Return values
Node|null

prependChild()

Adds $child as the very first child of $this

public prependChild(Node $child) : void
Parameters
$child : Node
Return values
void

previous()

public previous() : Node|null
Return values
Node|null

replaceChildren()

Replace all children of given node with collection of another

public replaceChildren(iteratable<string|int, Node$children) : $this
Parameters
$children : iteratable<string|int, Node>
Return values
$this

replaceWith()

public replaceWith(Node $replacement) : void
Parameters
$replacement : Node
Return values
void

setEndLine()

public setEndLine(int $endLine) : $this
Parameters
$endLine : int
Return values
$this

setLastLineBlank()

public setLastLineBlank(bool $blank) : void
Parameters
$blank : bool
Return values
void

setStartLine()

public setStartLine(int $startLine) : $this
Parameters
$startLine : int
Return values
$this

shouldLastLineBeBlank()

Determines whether the last line should be marked as blank

public shouldLastLineBeBlank(Cursor $cursor, int $currentLineNumber) : bool
Parameters
$cursor : Cursor
$currentLineNumber : int
Return values
bool

setParent()

protected setParent([Node|null $node = null ]) : void
Parameters
$node : Node|null = null
Return values
void

Search results