Maslosoft Zamm Documentation
Zamm is a documentation tool
Wrapper
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 $html
or $md
indicator to selected Zamm method calls.
Alternativelly this can be invoked by appending method calls, respectivelly html()
or 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:
Maslosoft\Zamm\Capture
Maslosoft\Zamm\Capture
echo (new Namer(Capture::class))->html . PHP_EOL;
echo (new Namer(Capture::class))->md;
Example usage of multiline wrapper:
/**
* Get code for HTML formatting.
* @return Wrapper
*/
public function html()
{
$this->isHtml = true;
return $this;
}
echo (new Source(Wrapper::class))->html()->md;