-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Postprocessing of documents returned by Template class before moving to final destination #56
Comments
For improving this enhancement, you could do that : public function save($strFilename = '') {
} No ? |
Yep, sure, this is good solution. This approach is backward compatible and takes minimum lines of new code. In the same time it has some disadvantages. From the other hand, my approach makes the implementation more clear, logically correct and easy to use. In the same time it's not backword compatible and requires more lines of code than yours. I thought that we are not competing here for some The Most Short Code award, so I gave preference to more clear and understandable code. Does it makes sense? |
Yes, now... I understand your approach and I agree with it. Thanks. I close your ticket. |
Currently, Template class has the "save()" method with the followed signature.
In most cases that's fine, but in some situations this approach it's not optimal enough.
For example, we have a batch of templates and we need to perform the followed actions with them.
a) Substitute macroses in each template.
b) Pack all the result documents in ZIP-archive and move this archive somewhere.
In such situtation Template class of current implementation allows us to do this, but it will require to save processed templates somewhere which involves unnecessary file copying. Moreover, we will have to delete these garbage files after archiving.
So, suggestion is to give options.
The text was updated successfully, but these errors were encountered: