On Tue, May 8, 2012 at 6:42 PM, Marc Delisle marc@infomarc.info wrote:
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
Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
Hi Marc,
I went through that document. If the function is global, it will be like 'PMA_getDivForSliderEffect()' And if it is a local function (for particular class), it will be like 'getDivForSliderEffect()'.
Though I went through that document before this, I couldn't get that point. Thanks for pointing out that.
Regards !