[Phpmyadmin-devel] Refactoring: Displaying query results

Chanaka Dharmarathna pe.chanaka.ck at gmail.com
Wed Jul 11 17:14:28 CEST 2012

Hi Dieter,

Thanks for your suggestions.

> I introduced new function to initialize set of properties of
> > PMA_DisplayResults class which are not set inside the constructor.
> > That functions is appeared as processParams().
> > But I'm not sure its a good name for that method.
> > Will a name like setProperties() or setAdditionalProperties() more
> suitable
> > for this function ?
> > Welcome to any suggestions.
> Hi Chanaka,
> Assuming that you are talking about the properties that are not set
> with a constructor parameter (the properties should be defined in the
> constructor anyway, but not necessarely with a value supplied by a
> constructor parameter), I think setProperties() is the best choice.

Yes, that's good.

> Would this method only set the properties that cannot be set with a
> constructor parameter, or just any property?

This method only set the properties which cannot be set in constructor.

> Maybe you can consider calling it setProperty($name, $value). This
> enables you to set just any parameter.

The class already have a method called __set($name, $value) to set any of
the property in class.
But since there are around 17 properties to initialized, I think better to
use this setProperties() method.

> How are your properties defined? As single variables? Or as an array
> of properties?

Sorry if I'm not calling to your question. (I'm not clear about what you
try to ask.)
>From the sql.php file I pass parameters to this function separately.
ex - setProperties($property1, property2, etc.)
Those properties are with different data types.

Regards !

Chanaka Indrajith
Bsc.Computer Engineering Undergraduate
Faculty of Engineering
University of Peradeniya
Sri Lanka
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20120711/1c4f1afe/attachment.html>

More information about the Developers mailing list