Hello,
phpdocx 4.0 includes a new WordFragment class, that is not a method but a class.
This is a simple example included in the library:
//path to the CreateDocx class within your PHPDocX installation
require_once '../../../classes/CreateDocx.inc';
$docx = new CreateDocx();
//Create a Word fragment with an image to be inserted in the header of the document
$imageOptions = array(
'src' => '../../img/image.png',
'dpi' => 300,
);
$footerImage = new WordFragment($docx, 'defaultFooter');
$footerImage->addImage($imageOptions);
$docx->addFooter(array('default' => $footerImage));
//add some text
$docx->addText('This document has a footer with just one image.');
$docx->createDocx('example_addFooter_1');
You can get more info on:
http://www.phpdocx.com/documentation/tutorial
Regards.