File src/MdVerb/MainVerbs.php
class Tlf\Scrawl\Ext\MdVerb\MainVerbs
See source code at /src/MdVerb/MainVerbs.php
Constants
Properties
-
public \Tlf\Scrawl $scrawl;a scrawl instance -
protected array $see_file_failures = [];array<string absolute_file_path, string relPath> array of files that didn't exist when see_file() was called -
protected array $claims_passed = []; -
protected array $claims_failed = []; -
protected array $import_failures = [];
Methods
-
public function __construct(\Tlf\Scrawl $scrawl) -
public function setup_handlers(\Tlf\Scrawl\Ext\MdVerbs $md_ext)add callbacks to$md_ext->handlers -
public function at_system(string $system_command, ...$options)Run a system command:@system(system_command, ...options). Options can betrim,trim_empty_lines,last_x_lines, int -
public function at_claim(string $test_name)Verify that a specific test is passing, outputting a pass/fail string, and linking to its file & line number. (REQUIREStaeluf/tester, and does not have an integration with PHPUnit.) -
public function at_template(string $templateName, ...$templateArgs)Load a built-in template or a template from a configured template directory. -
public function at_import(string $key)Import something previously exported with@exportor@export_start/@export_end -
public function at_file(string $relFilePath)Copy a file's content into your markdown. -
public function at_see_files(...$files)Outputs multiple markdown links. -
public function at_see_file(string $relFilePath, string $link_name = null)Get a link to a file in your repo -
public function at_hard_link(string $url, string $name=null)Returns a markdown link. (May provide validation in the future) -
public function at_link(string $link_name, string $alternative_text = null)Output links configured in yourscrawl.jsonconfig file, under the"links"key. Config format is{..., "links": { "link_name": "https://example.org"} } -
public function at_easy_link(string $service, string $target)Get a link to common services (twitter, gitlab, github, facebook) -
public function bootstrap() -
public function ast_generated(string $className, array $ast) -
public function astlist_generated(array $asts) -
public function scan_filelist_loaded(array $code_files) -
public function scan_file_processed(string $path, string $relPath, string $file_content, array $file_exports) -
public function scan_filelist_processed(array $code_files, array $all_exports) -
public function doc_filelist_loaded(array $doc_files, \Tlf\Scrawl\Ext\MdVerbs $mdverb_ext) -
public function doc_file_loaded($path,$relPath,$file_content) -
public function doc_file_processed($path,$relPath,$file_content) -
public function doc_filelist_processed($doc_files) -
public function scrawl_finished()