<p>Hi Dieter,</p>
<p>First sorry for top posting. I'm using my phone to send this.</p>
<p>As I remember I discussed about this class structure in the mailing list before. At that time I decided to use singleton pattern for this class.</p>
<p>Anyway, I got the point you mentioned. Since the class itself have no properties singleton may not be essential here. I'll look more on what are the pros and cons between these two approaches in this kind background. Hope other also will share their ideas on this.</p>

<p>However, since I need to stop my work by tomorrow according to the GSoC timeline (Carol ask to do so) I'll take the responsibility of any necessary changes regarding this after GSoC session.</p>
<p>Regards !</p>
<p>Chanaka</p>
<p>On Aug 18, 2012 6:10 PM, "Dieter Adriaenssens" <<a href="mailto:dieter.adriaenssens@gmail.com">dieter.adriaenssens@gmail.com</a>> wrote:<br>
><br>
> Hi Chanaka,<br>
><br>
> I stumbled upon this piece of code (random pick) :<br>
><br>
> PMA_CommonFunctions::getInstance()->backquote($_REQUEST['view']['name'])<br>
><br>
> and it made me wonder if using a singleton for PMA_CommonFunctions is<br>
> necessary, because basicaly PMA_Commonfunctions is a collection of<br>
> methods, not really a 'living' object.<br>
> So then I had a look at the class, and I discovered that the class has<br>
> no class variables (apart from the _instance variable) and an empty<br>
> constructor.<br>
> So basicly this should be a static class, with static methods, because<br>
> no instance is needed for it to work.<br>
><br>
> And the above piece of code will become :<br>
><br>
> PMA_CommonFunctions::backquote($_REQUEST['view']['name'])<br>
><br>
> BTW: If you convert it to a static class, don't forget to replace the<br>
> $this->method() calls by the static equivalent self::method().<br>
> BTW2 : you forgot to add the if (! defined('PHPMYADMIN')), check in<br>
> the beginning of the file, see [0].<br>
><br>
> [0] <a href="http://wiki.phpmyadmin.net/pma/File_template">http://wiki.phpmyadmin.net/pma/File_template</a><br>
> --<br>
> Kind regards,<br>
><br>
> Dieter Adriaenssens<br>
><br>
> ------------------------------------------------------------------------------<br>
> Live Security Virtual Conference<br>
> Exclusive live event will cover all the ways today's security and<br>
> threat landscape has changed and how IT managers can respond. Discussions<br>
> will include endpoint security, mobile security and the latest in malware<br>
> threats. <a href="http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/">http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/</a><br>
> _______________________________________________<br>
> Phpmyadmin-devel mailing list<br>
> <a href="mailto:Phpmyadmin-devel@lists.sourceforge.net">Phpmyadmin-devel@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a></p>