Skip to content
Snippets Groups Projects
Commit 5586893c authored by Charles Benke's avatar Charles Benke
Browse files

Update odf.php

add new fonction getvalue (valuename)
return value inside [valuename][/valuename] tag
parent 167ec691
No related branches found
No related tags found
No related merge requests found
......@@ -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];
}
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment