October\Rain\Html\BlockBuilder
Overview
BlockBuilder is used for building placeholders and putting content to them, the content is most often a string, however, it can also store objects.
Protected Properties
protected array $blockStack
protected array $blocks
Public Methods
public append()
public append($name, $content): void
append a content of the layout block
public endBlock()
public endBlock($append = false): void
endBlock closes the layout block Append indicates that the new content should be appended to the existing block content
public endPut()
public endPut($append = false): void
endPut is a helper for endBlock and also clears the output buffer Append indicates that the new content should be appended to the existing block content
public get()
public get($name, $default = null): void
get returns the layout block contents but not deletes the block from memory
public has()
public has($name): bool
has a placeholder set up
public placeholder()
public placeholder($name, $default = null): void
placeholder returns the layout block contents and deletes the block from memory.
public put()
public put($name): void
put is a helper for startBlock
public reset()
public reset(): void
reset clears all the registered blocks
public set()
public set($name, $content): void
set a content of the layout block.
public startBlock()
public startBlock($name): void
startBlock begins the layout block