Thursday, July 12, 2012

The Curious Case of the Underscore for Setters in Magento

So I have a field in my table called `item_z_index`

So you would think, the setter created by Magento would turn the underscores into CamelCase notation.

But no. It only converts to CamelCase notation for the first underscore. So I was thinking:

setItemZIndex('blah blah');

In reality it should be:

setItemZ_index('blah blah');

No comments:

Post a Comment