@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at recaptime-dev/main 33 lines 1.2 kB view raw
1<?php 2 3abstract class PhutilMarkupEngine extends Phobject { 4 5 /** 6 * Set a configuration parameter which the engine can read to customize how 7 * the text is marked up. This is a generic interface; consult the 8 * documentation for specific rules and blocks for what options are available 9 * for configuration. 10 * 11 * @param string $key Key to set in the configuration dictionary. 12 * @param string $value Value to set. 13 * @return $this 14 */ 15 abstract public function setConfig($key, $value); 16 17 /** 18 * After text has been marked up with @{method:markupText}, you can retrieve 19 * any metadata the markup process generated by calling this method. This is 20 * a generic interface that allows rules to export extra information about 21 * text; consult the documentation for specific rules and blocks to see what 22 * metadata may be available in your configuration. 23 * 24 * @param string $key Key to retrieve from metadata. 25 * @param mixed $default (optional) Default value to return if the key is 26 * not available. 27 * @return mixed Metadata property, or default value. 28 */ 29 abstract public function getTextMetadata($key, $default = null); 30 31 abstract public function markupText($text); 32 33}