/ LJCPHPCodeDoc / LJCTextBuilderLib / LJCTextBuilder / End


Parameters
$name - The element name.
$textState - The current text state values.
$addIndent - _ParamSummary_

Returns

The added element end tag.

Syntax

PHP
public function End(string $name, LJCTextState $textState
, bool $addIndent = true): string

Appends the element end tag.

Remarks

End() is an "Append Element" method. It creates the element text with GetEnd() and adds it to the builder. The appended text does not end with a new line. This allows for additions after the text. The added text will start with a new line if the builder text already has a value.

Example

PHP
 $textState = new LJCTextState();
 $tb = new LJCTextBuilder($textState);
 
 // Example Method:
 $tb->End("p", $textState);
 $result = $tb->ToString();
 
 // result:
 // </p>

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.