Documentation

TableCell extends AbstractBlock
in package

FinalYes

Block-level element

Table of Contents

Constants

ALIGN_CENTER  = 'center'
ALIGN_LEFT  = 'left'
ALIGN_RIGHT  = 'right'
TYPE_DATA  = 'data'
TYPE_HEADER  = 'header'

Properties

$data  : Data
$depth  : int
$endLine  : int|null
$firstChild  : Node|null
$lastChild  : Node|null
$next  : Node|null
$parent  : Node|null
$previous  : Node|null
$startLine  : int|null
$align  : string|null
$type  : string

Methods

__clone()  : mixed
Clone the current node and its children
__construct()  : mixed
appendChild()  : void
assertInstanceOf()  : void
children()  : array<string|int, Node>
detach()  : void
detachChildren()  : void
Detaches all child nodes of given node
firstChild()  : Node|null
getAlign()  : string|null
getDepth()  : int
getEndLine()  : int|null
getStartLine()  : int|null
getType()  : string
hasChildren()  : bool
insertAfter()  : void
Inserts the $sibling node after $this
insertBefore()  : void
Inserts the $sibling node before $this
iterator()  : NodeIterator
lastChild()  : Node|null
next()  : Node|null
parent()  : void
prependChild()  : void
Adds $child as the very first child of $this
previous()  : Node|null
replaceChildren()  : void
Replace all children of given node with collection of another
replaceWith()  : void
setAlign()  : void
setEndLine()  : void
setStartLine()  : void
setType()  : void
walker()  : NodeWalker
setParent()  : void

Constants

ALIGN_CENTER

public mixed ALIGN_CENTER = 'center'

ALIGN_RIGHT

public mixed ALIGN_RIGHT = 'right'

TYPE_HEADER

public mixed TYPE_HEADER = 'header'

Properties

$depth

protected int $depth = 0
Tags
psalm-readonly-allow-private-mutation

$firstChild

protected Node|null $firstChild = null
Tags
psalm-readonly-allow-private-mutation

$lastChild

protected Node|null $lastChild = null
Tags
psalm-readonly-allow-private-mutation

$next

protected Node|null $next = null
Tags
psalm-readonly-allow-private-mutation

$parent

protected Node|null $parent = null
Tags
psalm-readonly-allow-private-mutation

$previous

protected Node|null $previous = null
Tags
psalm-readonly-allow-private-mutation

$align

private string|null $align = null
Tags
psalm-var

self::ALIGN_*|null

phpstan-var

self::ALIGN_*|null

psalm-readonly-allow-private-mutation

$type

private string $type = self::TYPE_DATA
Tags
psalm-var

self::TYPE_*

phpstan-var

self::TYPE_*

psalm-readonly-allow-private-mutation

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!

__construct()

public __construct([string $type = self::TYPE_DATA ][, string|null $align = null ]) : mixed
Parameters
$type : string = self::TYPE_DATA
$align : string|null = null
Tags
psalm-param

self::TYPE_* $type

psalm-param

self::ALIGN_*|null $align

phpstan-param

self::TYPE_* $type

phpstan-param

self::ALIGN_*|null $align

appendChild()

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

assertInstanceOf()

public static assertInstanceOf(Node $node) : void
Parameters
$node : Node

children()

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

detach()

public detach() : void

detachChildren()

Detaches all child nodes of given node

public detachChildren() : void

firstChild()

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

getAlign()

public getAlign() : string|null
Tags
psalm-return

self::ALIGN_*|null

phpstan-return

self::ALIGN_*|null

Return values
string|null

getDepth()

public getDepth() : int
Return values
int

getEndLine()

public getEndLine() : int|null
Return values
int|null

getStartLine()

public getStartLine() : int|null
Return values
int|null

getType()

public getType() : string
Tags
psalm-return

self::TYPE_*

phpstan-return

self::TYPE_*

Return values
string

hasChildren()

public hasChildren() : bool
Return values
bool

insertAfter()

Inserts the $sibling node after $this

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

insertBefore()

Inserts the $sibling node before $this

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

lastChild()

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

prependChild()

Adds $child as the very first child of $this

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

previous()

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

replaceChildren()

Replace all children of given node with collection of another

public replaceChildren(iterable<string|int, Node$children) : void
Parameters
$children : iterable<string|int, Node>

replaceWith()

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

setAlign()

public setAlign(string|null $align) : void
Parameters
$align : string|null
Tags
psalm-param

self::ALIGN_*|null $align

phpstan-param

self::ALIGN_*|null $align

setEndLine()

public setEndLine(int|null $endLine) : void
Parameters
$endLine : int|null

setStartLine()

public setStartLine(int|null $startLine) : void
Parameters
$startLine : int|null

setType()

public setType(string $type) : void
Parameters
$type : string
Tags
psalm-param

self::TYPE_* $type

phpstan-param

self::TYPE_* $type

setParent()

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

        
On this page

Search results