This project is read-only.

PHPWord cloning template variables

Dec 9, 2013 at 5:40 AM
Edited Dec 9, 2013 at 5:47 AM
Immediately apologize for my English because I use a translator .

Good day, to upload data in MS WORD pattern using a library PHPWord, on the whole, satisfied . But recently encountered one problem.
So template format has the following format :
$ {section}
$ {object}
$ {docs}
Just fill it up is not difficult but I have to enter the data from the base and there are the following dependencies $ {docs} depends on $ {object} and $ {object} of $ {section}, ie after sampling from a base in the template must be added automatically record new variables. for example, after sampling pattern should look like
    $ {section_1}

    $ {object_1_1}
    $ {docs_1_1_1}
    $ {docs_1_1_2}
    $ {docs_1_1_3}

    $ {object_1_2}
    $ {docs_1_2_1}
    $ {docs_1_2_2}

    $ {section_2}

    $ {object_2_1}
    $ {docs_2_1_1}
    $ {docs_2_1_2}
    $ {docs_2_1_3}
    $ {docs_2_1_4}

    $ {object_2_2}
    $ {docs_2_2_1}
    $ {docs_2_2_2}

And after that fill these variables .