1be906b56SAndreas Gohr<?php 2be906b56SAndreas Gohr 3be906b56SAndreas Gohrnamespace dokuwiki\Parsing\ParserMode; 4be906b56SAndreas Gohr 5*71096e46SAndreas Gohrclass File extends Code 6be906b56SAndreas Gohr{ 7*71096e46SAndreas Gohr /** @var string The call type used in addCall ('code' or 'file') */ 8*71096e46SAndreas Gohr protected $type = 'file'; 9*71096e46SAndreas Gohr 10*71096e46SAndreas Gohr /** @inheritdoc */ 11*71096e46SAndreas Gohr public function getSort() 12*71096e46SAndreas Gohr { 13*71096e46SAndreas Gohr return 210; 14*71096e46SAndreas Gohr } 15*71096e46SAndreas Gohr 16be906b56SAndreas Gohr /** @inheritdoc */ 17be906b56SAndreas Gohr public function connectTo($mode) 18be906b56SAndreas Gohr { 19be906b56SAndreas Gohr $this->Lexer->addEntryPattern('<file\b(?=.*</file>)', $mode, 'file'); 20be906b56SAndreas Gohr } 21be906b56SAndreas Gohr 22be906b56SAndreas Gohr /** @inheritdoc */ 23be906b56SAndreas Gohr public function postConnect() 24be906b56SAndreas Gohr { 25be906b56SAndreas Gohr $this->Lexer->addExitPattern('</file>', 'file'); 26be906b56SAndreas Gohr } 27be906b56SAndreas Gohr} 28