Description

Zend_Pdf_Const was initially conceived as the single home for all PDF-related constants. This worked well enough when the number of constants was small, but recent work (ZF-6 and Zend_Pdf_Image subclasses) has more than tripled the constant count, making a master class like this difficult to maintain.

None of the other components in the framework share this model; they all define constants in the base classes that use them. For consistency with the other components in the framework, and to improve maintainability going forward, move the constants currently defined in Zend_Pdf_Const to the base classes in which they are used.

Comments

Posted by Willie Alberty (willie) on 2006-06-16T23:43:16.000+0000

This issue necessitates a change to the public API. Specific details to follow...

Posted by Willie Alberty (willie) on 2006-06-17T14:33:53.000+0000

Done. This issue caused a backwards-incompatible API change. To repair your code, you will need to perform the following global search-and-replace operations:

Finally, the old static arrays {{$pageSizeAliases}} and {{$standardFonts}} have been completely removed. There are no replacements.

Posted by Willie Alberty (willie) on 2006-06-17T17:26:10.000+0000

On Jun 17, 2006, at 4:04 PM, andi@zend.com wrote:

I have one piece of feedback though. The constants (not sure if you are responsible for naming them or not) don't use underscores to separate words. I think it'd be much nicer to do so. I know we have it in the PHP coding standards, but not sure if we wrote it in the ZFW coding standards (if not we should).

Posted by Willie Alberty (willie) on 2006-06-17T19:11:10.000+0000

Implemented Andi's request. All constants in Zend_Pdf now have underscores between words.

{panel:title=NOTE: Due to this change, ignore the instructions above and use these instead.|titleBGColor=#F7D6C1|bgColor=#FFFFCE}
To repair your code, you will need to perform the following global search-and-replace operations: