ZF-8401: Code outside class body


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)


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.