1be906b56SAndreas Gohr<?php 2be906b56SAndreas Gohr 3be906b56SAndreas Gohrnamespace dokuwiki\Parsing\ParserMode; 4be906b56SAndreas Gohr 5*71096e46SAndreas Gohruse dokuwiki\Parsing\Handler; 6*71096e46SAndreas Gohr 7be906b56SAndreas Gohrclass Nocache extends AbstractMode 8be906b56SAndreas Gohr{ 9be906b56SAndreas Gohr /** @inheritdoc */ 10*71096e46SAndreas Gohr public function getSort() 11*71096e46SAndreas Gohr { 12*71096e46SAndreas Gohr return 40; 13*71096e46SAndreas Gohr } 14*71096e46SAndreas Gohr 15*71096e46SAndreas Gohr /** @inheritdoc */ 16be906b56SAndreas Gohr public function connectTo($mode) 17be906b56SAndreas Gohr { 18be906b56SAndreas Gohr $this->Lexer->addSpecialPattern('~~NOCACHE~~', $mode, 'nocache'); 19be906b56SAndreas Gohr } 20be906b56SAndreas Gohr 21be906b56SAndreas Gohr /** @inheritdoc */ 22*71096e46SAndreas Gohr public function handle($match, $state, $pos, Handler $handler) 23be906b56SAndreas Gohr { 24*71096e46SAndreas Gohr $handler->addCall('nocache', [], $pos); 25*71096e46SAndreas Gohr return true; 26be906b56SAndreas Gohr } 27be906b56SAndreas Gohr} 28