Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/infrastructure/markup/PhutilMarkupEngine.php
12241 views
1
<?php
2
3
abstract 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 to set in the configuration dictionary.
12
* @param string 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 to retrieve from metadata.
25
* @param mixed Default value to return if the key is not available.
26
* @return mixed Metadata property, or default value.
27
*/
28
abstract public function getTextMetadata($key, $default = null);
29
30
abstract public function markupText($text);
31
32
}
33
34