| 1 | <?php | ||
| 19 | class HighlightRuntimeExtension extends \Twig_Extension | ||
| 20 | { | ||
| 21 | /** | ||
| 22 | * @var HighlighterInterface | ||
| 23 | */ | ||
| 24 | private $highlighter; | ||
| 25 | |||
| 26 | /** | ||
| 27 | * Highlight_RuntimeExtension constructor. | ||
| 28 | * | ||
| 29 | * @param \Mes\Misc\HighlightBundle\HighlighterInterface $h | ||
| 30 | */ | ||
| 31 | public function __construct(HighlighterInterface $h) | ||
| 35 | |||
| 36 | /** | ||
| 37 | * @param $content | ||
| 38 | * @param null $language | ||
| 39 | * @param null $rootPath | ||
| 40 | * | ||
| 41 | * @return string | ||
| 42 | */ | ||
| 43 | public function searchPatternAndHighlight($content, $language = null, $rootPath = null) | ||
| 51 | |||
| 52 | /** | ||
| 53 | * @param $content | ||
| 54 | * @param null $language | ||
| 55 | * | ||
| 56 | * @return string | ||
| 57 | */ | ||
| 58 | public function highlight($content, $language = null) | ||
| 62 | } | ||
| 63 |