Library for fast handling of template with phpword
- PHP >= 5.3.9
- Phalcon >= 2.0.0
Install composer in a common location or in your project:
curl -s http://getcomposer.org/installer | php
Create the composer.json file as follows:
{
"require": {
"Mctekk/PhalconDocs":"dev-master"
}
}
TemplateProcessor
<?php
$model = YorModels::findFirst(1);
$path = '/path/to/you/template/';
$docs = new PhalconDocs\TemplateProcessor($path . "file.docx", $model);
$docs->saveAs($path . "newfile.docx");