setClass ('span'); if (isset($style_name)) { $this->setStyleName ($style_name); } } /** * Return the elements name. * * @return string The ODT XML element name. */ public function getElementName () { return ('text:span'); } /** * Return string with encoded opening tag. * * @return string The ODT XML code to open this element. */ public function getOpeningTag () { return ''; } /** * Return string with encoded closing tag. * * @return string The ODT XML code to close this element. */ public function getClosingTag () { return ''; } /** * Are we in a paragraph or not? * As a span we ask our parent. * * @return boolean */ public function getInParagraph() { $parent = $this->getParent(); if (isset($parent)) { return $parent->getInParagraph(); } return NULL; } /** * Determine and set the parent for this element. * As a span the previous element is our parent. * * @param ODTStateElement $previous */ public function determineParent(ODTStateElement $previous) { $this->setParent($previous); } }