Page MenuHomeClusterLabs Projects
Diviner Tech Docs PhutilRemarkupHyperlinkRule

final class PhutilRemarkupHyperlinkRule
Phorge Technical Documentation (Remarkup)

This class is not documented.

Methods

public function setEngine($engine)
Inherited

This method is not documented.
Parameters
PhutilRemarkupEngine$engine
Return
wild

public function getEngine()
Inherited

This method is not documented.
Return
wild

public function getPriority()

This method is not documented.
Return
wild

public function apply($text)

This method is not documented.
Parameters
$text
Return
wild

public function getPostprocessKey()
Inherited

This method is not documented.
Return
wild

public function didMarkupText()

This method is not documented.
Return
wild

protected function replaceHTML($pattern, $callback, $text)
Inherited

This method is not documented.
Parameters
$pattern
$callback
$text
Return
wild

private function replaceHTMLCallback($match)
Inherited

This method is not documented.
Parameters
array$match
Return
wild

protected function newTag($name, $attrs, $content)
Inherited

PhutilRemarkupRule

Safely generate a tag.

In Remarkup contexts, it's not safe to use arbitrary text in tag attributes: even though it will be escaped, it may contain replacement tokens which are then replaced with markup.

This method acts as phutil_tag(), but checks attributes before using them.

Parameters
string$nameTag name.
dict<string,$attrswild> Tag attributes.
wild$contentTag content.
Return
PhutilSafeHTMLTag object.

protected function assertFlatText($text)
Inherited

PhutilRemarkupRule

Assert that a text token is flat (it contains no replacement tokens).

Because tokens can be replaced with markup, it is dangerous to use arbitrary input text in tag attributes. Normally, rule precedence should prevent this. Asserting that text is flat before using it as an attribute provides an extra layer of security.

Normally, you can call newTag() rather than calling this method directly. newTag() will check attributes for you.

Parameters
wild$textOstensibly flat text.
Return
stringFlat text.

protected function isFlatText($text)
Inherited

PhutilRemarkupRule

Check whether text is flat (contains no replacement tokens) or not.

Parameters
wild$textOstensibly flat text.
Return
boolTrue if the text is flat.

public function markupHyperlinkAngle($matches)

This method is not documented.
Parameters
array$matches
Return
wild

public function markupHyperlinkCurly($matches)

This method is not documented.
Parameters
array$matches
Return
wild

protected function markupHyperlink($mode, $matches)

This method is not documented.
Parameters
$mode
array$matches
Return
wild

protected function renderHyperlink($link, $is_embed)

This method is not documented.
Parameters
$link
$is_embed
Return
wild

private function renderRawLink($link, $is_embed)

This method is not documented.
Parameters
$link
$is_embed
Return
wild

protected function markupHyperlinkUngreedy($matches)

This method is not documented.
Parameters
$matches
Return
wild