public function setVars($key, $value, $encode = true, $charset = 'ISO-8859')
    {
        if (strpos($this->xml, $this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT')) === false) {
            throw new SegmentException("var $key not found in {$this->getName()}");
        }
        $value = $encode ? htmlspecialchars($value) : $value;
        $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value;
        $this->vars[$this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT')] = str_replace("\n", "<text:line-break/>", $value);
        return $this;
    }
public function setVars($key, $value, $encode = true, $charset = 'ISO-8859')
    {
        if (strpos($this->xml, $this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT')) === false) {
            throw new SegmentException("var $key not found in {$this->getName()}");
        }
        $value = $encode ? htmlspecialchars($value) : $value;
        $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value;
        $this->vars[$this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT')] = str_replace("\n", "<text:line-break/>", $value);
        return $this;
    }
public function setVars ( $ key , $ value , $ encode = true , $ charset = 'ISO-8859' ) { if ( strpos ( $ this -> xml , $ this -> odf -> getConfig ( 'DELIMITER_LEFT' ) . $ key . $ this -> odf -> getConfig ( 'DELIMITER_RIGHT' ) ) === false ) { throw new SegmentException ( "var $key not found in {$this->getName()}" ) ; } $ value = $ encode ? htmlspecialchars ( $ value ) : $ value ; $ value = ( $ charset == 'ISO-8859' ) ? utf8_encode ( $ value ) : $ value ; $ this -> vars [ $ this -> odf -> getConfig ( 'DELIMITER_LEFT' ) . $ key . $ this -> odf -> getConfig ( 'DELIMITER_RIGHT' ) ] = str_replace ( "\n" , "<text:line-break/>" , $ value ) ; return $ this ; }
Assign a template variable to replace

@param string $key
@param string $value
@throws SegmentException
@return Segment
Assign a template variable to replace