Templates : Closing file without saving

Jan 21, 2013 at 1:28 PM

Hi all,

I've been working on template files for one of my websites and have in the process updated some of the code of the setValue function to throw exceptions.

Now here's my question : when an exception is thrown I stop the modification of my template file and therefore wish to close it without saving. If I simply end my program there and then, a default file is created in the same directory as the template file and there is, to my knowledge, no built-in method to close the template file opened with loadTemplate.

I've been trying to create my own close method for the PHPWord_Template object but I'm not familiar with such systems. Could anybody point me in the right direction?