Forum


Replies: 11   Views: 5624
Problem with blocks
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by kdurolek  · 05-06-2014 - 09:35

I perfectly understand that for more complex help we should pay. But issues that I found looks like bugs. My scripts have 3/4 lines and template used for tests has max 3 lines. So in my opinion I'm not doing anything unusual. I just try to use basic functions of library. I'm responsible for recommendation of the best library to my company that's why I have to know if it can handle our requirements. I will try to be brief. PROBLEM 1 Template: Say $BLOCK_A$Aaa$BLOCK_A$ $BLOCK_B$Bee$BLOCK_B$ Code: $docx = new \Phpdocx_Phpdocx($templatePath); $docx->clearBlocks(); $docx->createDocx($docPath)); Expected: Say Aaa Bee Result Just "Say". It removed block tags with content instead of just block tags. PROBLEM 2 Template: Say $BLOCK_A$Aaa$BLOCK_A$$BLOCK_B$Bee$BLOCK_B$ Code: $docx = new \Phpdocx_Phpdocx($templatePath); $docx->deleteTemplateBlock('A'); $docx->createDocx($docPath); Expected: Say Bee Result Blank document. Whole content was removed. SUMMARY As you see it's hard to call my code and template complex. But results that I got are more then surprising. I tried to look for some information in documentation but there is no information about detail behavior of this functions. Regards