"Jeroen De Dauw" posted a comment on MediaWiki.r111264.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/111264#c30832

Commit summary for MediaWiki.r111264:

adding DBDataObject class after having some people review it and posting on the 
list. docs can currently be found at 
https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw/DBDataObject

Jeroen De Dauw's comment:

An instance represents a row. So if you want to do an operation on a table as a 
whole, it makes no sense to make an instance. I think it even does not make 
sense if you ignore that first argument. Why would you create an instance of an 
object if there is absolutely no need to?

<pre>
$instance = new MyClass();
$instance->someNonInstanceBehaviour();
</pre>

<pre>
MyClass::someNonInstanceBehaviour();
</pre>

The later one looks more sane to me.

_______________________________________________
MediaWiki-CodeReview mailing list
mediawiki-coderev...@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to