Zend Framework

Code outside class body

Details

  • Type: Coding Standards Violation Coding Standards Violation
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.6
  • Fix Version/s: 1.9.7
  • Component/s: Zend_Search_Lucene
  • Labels:
    None

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)

Activity

Hide
Alexander Veremyev added a comment -

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.

Show
Alexander Veremyev added a comment - 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.
Hide
Alexander Veremyev added a comment -

Fixed.

Show
Alexander Veremyev added a comment - Fixed.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: