Update odf.php

add new fonction getvalue (valuename)
return value inside [valuename][/valuename] tag
This commit is contained in:
BENKE Charles 2014-11-01 21:00:28 +01:00
parent 167ec6917a
commit 5586893ca2

View File

@ -610,6 +610,21 @@ IMG;
closedir($handle);
}
}
/**
* return the value present on odt in [valuename][/valuename]
* @param string $value name balise in the template
* @return string the value inside the balise
*
*/
public function getvalue($valuename)
{
$searchreg="/\\[".$valuename."\\](.*)\\[\\/".$valuename."\\]/";
preg_match($searchreg, $this->contentXml, $matches);
$this->contentXml = preg_replace($searchreg, "", $this->contentXml);
return $matches[1];
}
}
?>