Add code comment
This commit is contained in:
parent
bb8e53deea
commit
80e10158a5
@ -76,12 +76,15 @@ class Segment implements IteratorAggregate, Countable
|
||||
/**
|
||||
* Replace variables of the template in the XML code
|
||||
* All the children are also called
|
||||
* Complete the current segment with new line
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function merge()
|
||||
{
|
||||
$this->xmlParsed .= str_replace(array_keys($this->vars), array_values($this->vars), $this->xml);
|
||||
$this->xmlParsed .= str_replace(array_keys($this->vars), array_values($this->vars), $this->xml); // We concat all file, later we will
|
||||
// Note: To change style of table-row, we should make a replace here to add attribute
|
||||
// table:style-name="Table4.A2"
|
||||
if ($this->hasChildren()) {
|
||||
foreach ($this->children as $child) {
|
||||
$this->xmlParsed = str_replace($child->xml, ($child->xmlParsed=="")?$child->merge():$child->xmlParsed, $this->xmlParsed);
|
||||
|
||||
@ -107,6 +107,8 @@ class Odf
|
||||
|
||||
copy($filename, $this->tmpfile);
|
||||
|
||||
// Now file has been loaded, we must move the [!-- BEGIN and [!-- END tags outside the
|
||||
// <table:table-row tag
|
||||
$this->_moveRowSegments();
|
||||
}
|
||||
|
||||
@ -381,7 +383,8 @@ IMG;
|
||||
}
|
||||
|
||||
/**
|
||||
* Declare a segment in order to use it in a loop
|
||||
* Declare a segment in order to use it in a loop.
|
||||
* Extract the segment and store it into $this->segments[]. Return it for next call.
|
||||
*
|
||||
* @param string $segment
|
||||
* @throws OdfException
|
||||
|
||||
Loading…
Reference in New Issue
Block a user