Page MenuHomePhorge
Diviner Tech Docs PhabricatorSpacesRemarkupRule

final class PhabricatorSpacesRemarkupRule
Phorge Technical Documentation (Spaces)

This class is not documented.

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

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()
Inherited

This method is not documented.
Return
wild

public function apply($text)
Inherited

PhutilRemarkupRule

Check input whether to apply RemarkupRule. If true, apply formatting.

Parameters
string|PhutilSafeHTML$textString to check and potentially format.
Return
string|PhutilSafeHTMLUnchanged input if no match, or input after matching the formatting rule and applying the formatting.

public function getPostprocessKey()
Inherited

This method is not documented.
Return
wild

public function didMarkupText()
Inherited

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.

protected function getObjectNamePrefix()

This method is not documented.
Return
wild

protected function loadObjects($ids)

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

protected function getObjectNamePrefixBeginsWithWordCharacter()
Inherited

This method is not documented.
Return
wild

protected function getObjectIDPattern()
Inherited

This method is not documented.
Return
wild

protected function shouldMarkupObject($params)
Inherited

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

protected function getObjectNameText($object, $handle, $id)
Inherited

This method is not documented.
Parameters
$object
PhabricatorObjectHandle$handle
$id
Return
wild

protected function loadHandles($objects)
Inherited

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

protected function getObjectHref($object, $handle, $id)
Inherited

This method is not documented.
Parameters
$object
PhabricatorObjectHandle$handle
$id
Return
wild

protected function renderObjectRefForAnyMedia($object, $handle, $anchor, $id)
Inherited

This method is not documented.
Parameters
$object
PhabricatorObjectHandle$handle
$anchor
$id
Return
wild

protected function renderObjectRef($object, $handle, $anchor, $id)
Inherited

This method is not documented.
Parameters
$object
PhabricatorObjectHandle$handle
$anchor
$id
Return
wild

protected function renderObjectEmbedForAnyMedia($object, $handle, $options)
Inherited

This method is not documented.
Parameters
$object
PhabricatorObjectHandle$handle
$options
Return
wild

protected function renderObjectEmbed($object, $handle, $options)
Inherited

This method is not documented.
Parameters
$object
PhabricatorObjectHandle$handle
$options
Return
wild

final protected function renderDefaultObjectEmbed($object, $handle)
Inherited

This method is not documented.
Parameters
$object
PhabricatorObjectHandle$handle
Return
wild

protected function renderObjectTagForMail($text, $href, $handle)
Inherited

This method is not documented.
Parameters
$text
$href
PhabricatorObjectHandle$handle
Return
wild

protected function renderHovertag($name, $href, $attr)
Inherited

This method is not documented.
Parameters
$name
$href
array$attr
Return
wild

private function getObjectEmbedPattern()
Inherited

This method is not documented.
Return
wild

private function getObjectReferencePattern()
Inherited

This method is not documented.
Return
wild

public function extractReferences($text)
Inherited

PhabricatorObjectRemarkupRule

Extract matched object references from a block of text.

This is intended to make it easy to write unit tests for object remarkup rules. Production code is not normally expected to call this method.

Parameters
string$textText to match rules against.
Return
wildMatches, suitable for writing unit tests against.

public function markupObjectEmbed($matches)
Inherited

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

public function markupObjectReference($matches)
Inherited

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

private function markupObject($params)
Inherited

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