I'm reworking Zend_Pdf_Image anyway, so it will be totally different pre
1.0.
This upgrade is logged as ZF-11 and the status is approximately 50%
complete.
Kevin
----- Original Message -----
From: "Alexander Veremyev" <[EMAIL PROTECTED]>
To: "Lars Strojny" <[EMAIL PROTECTED]>
Cc: <[email protected]>; "André Hoffmann"
<[EMAIL PROTECTED]>
Sent: Monday, February 19, 2007 11:46 AM
Subject: Re: [fw-general] UML, ZF Coding Standard differences in Zend_Pdf
Hi all,
It's not a bug. It's a feature :)
Zend_Pdf_Image is not intended to be used without Zend_Pdf class.
Zend/Pdf/Resource/Image.php file is loaded by require_once() call in
Zend/Pdf.php file.
So there are no problem for classes autoloading.
The reason for such coding standards breaking is the fact that
Zend_Pdf_Resource class is "implementation details" which should not be
used (directly or through descendant classes) in userland. So it's hidden
from end users to simplify API.
That's described in Zend_Pdf_Image class comments:
---------------
Class is named not in accordance to the name convention.
It's "end-user" class, but its ancestor is not.
Thus part of the common class name is removed.
---------------
From the other side there are no any other reason to make this coding
standards break.
With best regards,
Alexander Veremyev.
Lars Strojny wrote:
Hi,
Am Montag, den 19.02.2007, 14:01 +0100 schrieb André Hoffmann:
[...]
While reverse-engineering the ZF for testing purposes I came across
some major Coding Standard differences in the Zend Framework
concerning the classes in Zend/Pdf/Resource:
For example Zend_Pdf_Image is not(as you would guess by the name)
located in Zend/Pdf/Image.php, but in Zend/Pdf/Resource/Image.php. I
couldn't double-check this with the Coding Standard though as the
wiki seems to be down(502 Proxy Error).
I'm aware that __autoload is not used in the Zend Framework and
therefore this is not such a big deal, but since I'm a fan of the
"class name represents the location"-model I'd like to mention it at
least(given the almost final stage of the ZF).
__autoload() is of course used in ZF. A lot of tutorials suggest to
either define function __autoload($className)
{ Zend::loadClass($className) } or to do
spl_register_autoload(array("Zend", "loadClass")). Not just as a matter
of this fact it is definitely a bug and should be fixed. Thanks for your
hint.
Greetings, Lars