[dev] [cvs] commit: framework/Image/Image/Effect/im round_corners.php

Michael Rubinsky mike at theupstairsroom.com
Thu Nov 8 20:59:36 UTC 2007


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Michael Rubinsky <mike at theupstairsroom.com>:
>
>> mrubinsk    2007-11-08 14:27:36 EST
>>
>>   Modified files:
>>     Image/Image/Effect/im round_corners.php
>>   Log:
>>   Thanks to Mikko for clarifying this should be > 6.2.8, NOT >= 6.2.8
>>
>>   Revision  Changes    Path
>>   1.8       +3 -3      framework/Image/Image/Effect/im/round_corners.php
>
> Wouldn't it be better to check if a method exists, instead of checking
> version numbers?

Yes, but $this->_image->_imagick is a proxy class...->roundCorners()  
would go to __call().  A pear error would be returned from __call() if  
the method doesn't exist, but a pear error could be returned for a  
number of other reasons as well, so it seemed cleaner to check for the  
version number.  I guess the other option would be to add a  
methodExists() method to the proxy...but I figured I already have the  
getVersion function since we need it for other checks anyway.





>
> Jan.
>
> --
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
>
>
> --
> Horde developers mailing list - Join the hunt: http://horde.org/bounties/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
> !DSPAM:47336663163769218520170!
>



Thanks,
mike

--
The Horde Project (www.horde.org)
mrubinsk at horde.org

"Time just hates me. That's why it made me an adult." - Josh Joplin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 2013 bytes
Desc: PGP Public Key
Url : http://lists.horde.org/archives/dev/attachments/20071108/7c9f3804/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: PGP Digital Signature
Url : http://lists.horde.org/archives/dev/attachments/20071108/7c9f3804/attachment-0001.bin 


More information about the dev mailing list