// Root Method Begin
$textState = new LJCTextState();
$result = self::CustomBegin("body", $textState);
// result:
// <body>
private static string CustomBegin(string $name, LJCTextState $textState
, LJCAttributes $attribs = null, bool $addIndent = true
, bool $childIndent = true)
{
$tb = new LJCTextBuilder($textState);
$createText = hb->GetBegin(name, $textState, $attribs, $addIndent
, $childIndent);
$addIndent = false;
$tb->Text($createText, $addIndent);
// Use AddChildIndent after beginning an element.
$tb->AddChildIndent($createText, $textState);
$result = $tb->ToString();
// Append Method
//hb->UpdateState($textState);
return result;
}
|