API / Minn\Content / Blocks

Blocks final class

Minn\Content\Blocks · public/minn/src/Minn/Content/Blocks.php · 46 lines

The content pipeline's front door: block markup goes through the block renderer (Minn\Blocks), classic content rides the paragraph pipeline.

Constants and properties

privatestatic ?Minn\Blocks\Renderer $offRequest

The renderer for code that renders with no request behind it: the command line and the unit suite.

Public

staticrender(string $raw): string#

Post content as HTML: blocks through the renderer, classic content through the paragraph rules.

staticrenderer(): Minn\Blocks\Renderer#

The block renderer of the request being answered, which its runtime holds and builds over that request's own database door. With no runtime (the command line, the unit suite) one off-request renderer stands in.

staticparagraphs(string $raw): string#

Plain prose to paragraphs: texturize, split on blank lines, <br /> on single newlines. Shared by classic post content and comment text.