ZF-8401: Code outside class body

Issue Type: Coding Standards Violation Created: 2009-11-26T04:57:45.000+0000 Last Updated: 2009-12-14T03:43:24.000+0000 Status: Resolved Fix version(s): - 1.9.7 (11/Jan/10)

Reporter: Mickael Perraud (mikaelkael) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Search_Lucene

Related issues: Attachments:


In Zend_Search_Lucene_(Docx | Pptx | Xmlx | OpenXml), we have outside of the main class a:

<pre class="highlight">
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)


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


Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.