[PEPr] Comment on Images::GraPHPite
| From: | Jesper Veggerby | Date: | Wed, 01 Sep 2004 10:04:56 +0000 |
| Subject: | [PEPr] Comment on Images::GraPHPite | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33140@lists.php.net to get a copy of this message | ||
Jesper Veggerby (http://pear.php.net/user/nosey) has commented on the proposal for
Images::GraPHPite.
Comment:
Thanks for clearing this - during refacoring I *was* wondering whether fx
the file Grid.php should be in Images/GraPHPite/Grid or just
/Images/GraPHPite.
In my code (and the one available for download) I cannot find any
instances of $Canvas (they should be lc first already!)
As regards to the require_once(), the CS manual states:
Note: include_once() and require_once() are statements, not functions.
You don't *need* parentheses around the filename to be included.
But if it *is* required I will surely change it.
As regards to named_colors.txt - shouldn't it be placed in the data
folder?
Image_GraPHPite_Parent -> Image_GraPHPite_Common definitely (more
meaningfull)
I will change the globals. The CS manual states
If your package needs to define global variables, their name should start
with a single underscore followed by the package name and another
underscore. For example, the PEAR package uses a global variable called
$_PEAR_destructor_object_list.
Which I originally read as $_GraPHPite_*, but I can understand the
$_Image_GraPHPite. If it has to be uppercase: then sure - PEAR is of
course uc already so maybe the example in the manual is misleading(?).
About the private versus public globals: I can understand the difference,
i.e. the $_GraPHPite_gd2 should have no meaning for the user but the
$_GraPHPite_font should, but the manual clearly states that globals should
be $_ always.
Could someone please second Alan's comment? I will surely change it but
not if the change actually violates CS.
The other things I will change ASAP :)
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=145
--
Sent by PEPr, the automatic proposal system at http://pear.php.net