[Phpmyadmin-devel] Refactoring: Displaying query results

Marc Delisle marc at infomarc.info
Tue May 8 15:12:14 CEST 2012


Le 2012-05-08 09:01, Chanaka Dharmarathna a écrit :
(...)
>>> Hi Rouslan,
>>>
>>> Do you have any idea of using different naming conventions for this
>>> ('PMA_generate_slider_effect') function than general. (not only this,
>> there
>>> are several functions)
>>> Generally function names are like 'PMA_meaningfulDescription()'. This
>> does
>>> not use underscores after 'PMA_' part and use camel caps.
>>> But here it is 'PMA_generate_slider_effect()'. Its different.
>>>
>>> As well, Since this function is going to return a string after modifying,
>>> the name should be change to give a meaning to the user (developer).
>>> I'm thinking modify the name with 'get' phrase for that kind of
>> functions.
>>> Ex :- 'PMA_getSliderEffectGeneratingHtml()' instead of
>>> 'PMA_generate_slider_effect' (existing one)
>>> Do you have any suggestions on that ?
>>>
>>> Regards !
>>
>> PMA_getDivForSliderEffect()
>>
>> By the way, this is the naming convention for a global function (outside
>> a class). Will this be inside a class?
> 
> Hi Marc,
> 
> That name is seems pretty good. Thanks for suggesting.
> And Marc, what about the naming convention of local (for a class) methods.
> 
> As I feel common.lib.php file should contain a class and this function will
> be inside that.
> 
> Regards !

See "Class Variables and Methods" in [0].

[0] http://pear.php.net/manual/en/standards.naming.php


-- 
Marc Delisle
http://infomarc.info

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 898 bytes
Desc: OpenPGP digital signature
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120508/c25c209b/attachment.sig>


More information about the Developers mailing list