1<?php 2 3require_once DOKU_PLUGIN.'odt/ODT/elements/ODTStateElement.php'; 4 5/** 6 * ODTElementRoot: 7 * Root-Element to make things easier. Always needs to be on top of ODTState. 8 * 9 * @license GPL 2 (http://www.gnu.org/licenses/gpl.html) 10 * @author LarsDW223 11 */ 12class ODTElementRoot extends ODTStateElement 13{ 14 /** 15 * Constructor. 16 */ 17 public function __construct() { 18 parent::__construct(); 19 $this->setClass ('root'); 20 $this->setCount (1); 21 } 22 23 /** 24 * Return the elements name. 25 * 26 * @return string The ODT XML element name. 27 */ 28 public function getElementName () { 29 // Dummy. 30 return 'root'; 31 } 32 33 /** 34 * Return string with encoded opening tag. 35 * 36 * @return string The ODT XML code to open this element. 37 */ 38 public function getOpeningTag () { 39 // Dummy. 40 return ''; 41 } 42 43 /** 44 * Return string with encoded closing tag. 45 * 46 * @return string The ODT XML code to close this element. 47 */ 48 public function getClosingTag () { 49 // Dummy. 50 return ''; 51 } 52 53 /** 54 * Set parent dummy function for preventing that anyone 55 * accidentally sets a parent for the root. 56 * 57 * @param ODTStateElement $parent_element 58 */ 59 public function setParent(ODTStateElement $parent_element) { 60 // Intentionally do nothing! 61 } 62 63 /** 64 * Are we in a paragraph or not? 65 * This is the root - so we are not. 66 * 67 * @return boolean 68 */ 69 public function getInParagraph() { 70 return false; 71 } 72 73 /** 74 * Determine and set the parent for this element. 75 * Nothing to do for the root. 76 */ 77 public function determineParent(ODTStateElement $previous) { 78 // Intentionally do nothing! 79 } 80} 81