*/ class syntax_plugin_bbcode_email extends SyntaxPlugin { /** @inheritdoc */ public function getType() { return 'substition'; } /** @inheritdoc */ public function getSort() { return 105; } /** @inheritdoc */ public function connectTo($mode) { $this->Lexer->addSpecialPattern('\[email.+?\[/email\]', $mode, 'plugin_bbcode_email'); } /** @inheritdoc */ public function handle($match, $state, $pos, Handler $handler) { $match = trim(substr($match, 7, -8)); [$url, $title] = sexplode(']', $match, 2, null); $handler->addCall('emaillink', [$url, $title], $pos); return true; } /** @inheritdoc */ public function render($format, Doku_Renderer $renderer, $data) { return true; } }