1<?php 2/** 3 * Helper class to fake a document tree for CSS matching. 4 * 5 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 6 * @author LarsDW223 7 */ 8 9require_once DOKU_INC.'lib/plugins/odt/helper/ecm_interface.php'; 10require_once DOKU_INC.'lib/plugins/odt/ODT/css/cssdocument.php'; 11 12// must be run within Dokuwiki 13if (!defined('DOKU_INC')) die(); 14 15/** 16 * Class css_document 17 * 18 * @package helper\cssdocument 19 */ 20class helper_plugin_odt_cssdocument extends DokuWiki_Plugin { 21 protected $internal = NULL; 22 23 public function __construct() { 24 $this->internal = new cssdocument(); 25 } 26 27 public function open ($element, $attributes=NULL, $pseudo_classes=NULL, $pseudo_elements=NULL) { 28 $this->internal->open ($element, $attributes, $pseudo_classes, $pseudo_elements); 29 } 30 31 public function close ($element) { 32 $this->internal->close ($element); 33 } 34 35 public function getCurrentElement() { 36 return $this->internal->getCurrentElement (); 37 } 38 39 public function getEntry ($index) { 40 return $this->internal->getEntry ($index); 41 } 42 43 public function getCurrentEntry () { 44 return $this->internal->getCurrentEntry (); 45 } 46 47 public function getIndexLastOpened () { 48 return $this->internal->getIndexLastOpened (); 49 } 50 51 public function findParent ($start) { 52 return $this->internal->findParent ($start); 53 } 54 55 public function getPrecedingSibling ($current) { 56 return $this->internal->getPrecedingSibling ($current); 57 } 58 59 public function getDump () { 60 return $this->internal->getDump ($current); 61 } 62} 63