Serializer final class
Minn\Blocks\Serializer · public/minn/src/Minn/Blocks/Serializer.php · 69 lines
Parsed blocks back to markup. A core block is written by its short name; attributes are JSON with every character that could end the comment or open a tag spelled as an escape ("<" "<", "--" "--", a backslash "\"), so a value can never break out of its delimiter.
Public
| static | blocks(array $blocks): string# | A list of parsed blocks back to markup, freeform runs as written.
| ||||||
| static | block(Minn\Blocks\Block $block): string# | One block with its inner blocks, as the delimiter comments the parser reads. | ||||||
| static | delimited(?string $name, array $attrs, string $content): string# | Content wrapped in a block's delimiters; a block with no content is written self-closing. | ||||||
| static | attributes(array $attrs): string# | Block attributes as the delimiter carries them. | ||||||
| static | spreadInnerContent(array $innerContent, array $counts): array# | A parsed block's inner content with each inner block's place (a null) taken as many times as that block became blocks, as a pattern that expands does; one that became none keeps its place.
@return list<string|null> |
Nothing matches.