1<?php 2 3namespace dokuwiki\Parsing\ParserMode; 4 5use dokuwiki\Parsing\Handler; 6 7class Windowssharelink extends AbstractMode 8{ 9 protected $pattern; 10 11 /** @inheritdoc */ 12 public function getSort() 13 { 14 return 350; 15 } 16 17 /** @inheritdoc */ 18 public function preConnect() 19 { 20 $this->pattern = "\\\\\\\\\w+?(?:\\\\[\w\-$]+)+"; 21 } 22 23 /** @inheritdoc */ 24 public function connectTo($mode) 25 { 26 $this->Lexer->addSpecialPattern( 27 $this->pattern, 28 $mode, 29 'windowssharelink' 30 ); 31 } 32 33 /** @inheritdoc */ 34 public function handle($match, $state, $pos, Handler $handler) 35 { 36 $handler->addCall('windowssharelink', [$match, null], $pos); 37 return true; 38 } 39} 40