# class Tlf\Scrawl\Ext\DefaultExt\MarkdownVerbs
Runs @mdverb
extensions, enabling special callbacks for @verb()
s in .src.md
files
Constants
Properties
-
protected $regData = [ 'verb' =>'/(?<!\\\\)\@([a-zA-Z_]+)\(([^\)]*)\)/m', ];
-
protected array $verbMap = [];
Array mapping verbs to callables['verb'=>[ $callable1, $callable2, $callable3], 'anotherverb'=>[...] ]
Methods
-
public function onBuildStart()
Setup the verb map -
public function onTemplateFileFound(\Tlf\Scrawl\File $templateFile)
Find verbs in a source md file -
public function matchVerb($info, $templateFile, $verb, $argListStr)
Execute md verb extension methods & update output-content -
public function writeMdFile(\Tlf\Scrawl\File $templateFile)
Append the correct md file to the output, to later be written by Scrawl -
public function parseArgListString(string $argListString): array
Parse an arg list string & return it as an array
Each arg is trimmed. There is no special handling of any character. Commas may not appear in arguments, as they are argument separators.