Ejemplo n.º 1
0
Wrapper is a helper, which is returned by various Zamm tools, this ensures proper
formatting, by adding HTML `pre` tag for HTML formatting, or triple ` ` ` for Markdown syntax.

There is also inline wrapper, to wrap inline snippets: class names, method names etc. 
This wraps text with `code` tag for HTML, or single ` ` ` for Markdown.

Both can be used by adding <?php 
echo $n->html->md;
?>
 or <?php 
echo $n->md->md;
?>
 indicator to selected Zamm method calls.
Alternativelly this can be invoked by appending method calls, respectivelly <?php 
echo $n->html()->md;
?>
 or <?php 
echo $n->md()->md;
?>
.
Wrapper type is defined by Zamm, so it is automatically selected according to context.
Generally, for names it is inline, for code fragments it is multiline.

Example usage of inline wrapper:

<?php 
Capture::open();
echo (new Namer(Capture::class))->html . PHP_EOL;
echo (new Namer(Capture::class))->md;
echo Capture::close()->md;