Differential D20774 Diff 49536 src/infrastructure/markup/blockrule/PhutilRemarkupBlockInterpreter.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/markup/blockrule/PhutilRemarkupBlockInterpreter.php
- This file was added.
| <?php | |||||
| abstract class PhutilRemarkupBlockInterpreter extends Phobject { | |||||
| private $engine; | |||||
| final public function setEngine($engine) { | |||||
| $this->engine = $engine; | |||||
| return $this; | |||||
| } | |||||
| final public function getEngine() { | |||||
| return $this->engine; | |||||
| } | |||||
| /** | |||||
| * @return string | |||||
| */ | |||||
| abstract public function getInterpreterName(); | |||||
| abstract public function markupContent($content, array $argv); | |||||
| protected function markupError($string) { | |||||
| if ($this->getEngine()->isTextMode()) { | |||||
| return '('.$string.')'; | |||||
| } else { | |||||
| return phutil_tag( | |||||
| 'div', | |||||
| array( | |||||
| 'class' => 'remarkup-interpreter-error', | |||||
| ), | |||||
| $string); | |||||
| } | |||||
| } | |||||
| } | |||||