ZF-8401: Code outside class body
Description
In Zend_Search_Lucene_(Docx | Pptx | Xmlx | OpenXml), we have outside of the main class a:
if (class_exists('ZipArchive', false)) {
Why not simply throwing an exception in OpenXml's constructor like other components (Zend_Db adapters)?
(this also stops API documentation generation)
Comments
Posted by Alexander Veremyev (alexander) on 2009-12-14T03:25:34.000+0000
The difference in comparison to Zend_Db adapters is that Zend_Search_Lucene_*** MS Office documents objects may be instantiated tens of thousands times (if extension is loaded). Current solution is a bit faster, but you are correct, it produces other problems. So I'll fix it.
Posted by Alexander Veremyev (alexander) on 2009-12-14T03:43:23.000+0000
Fixed.