This is a general rule for almost every object in Magento.
If you cannot find a method that starts with ‘get’ (for example $obj->getSomeField()
) this means is a substitute for getData()
method with an array key.
In the example above the key is some_field.
So in conclusion $obj->getSomeField()
translates into $obj->getData(’some_field’)
.
In your case $this->getLockedDoInvoice()
translates into $obj->getData(’locked_do_invoice’)
.
The rule of building the getData parameter is simple.
Remove ‘get’ from the method’s name and each uppercase letter except the first one turn it into underscore (_) followed by the same letter lower case.
This method also applies to methods that don’t exist and start with ‘set’, ‘uns’ or ‘has’.
This is possible for all the classes that extend Varien_Object.
For a clearer understanding look for the method __call() in class Varien_Object (lib\Varien\Object.php)
tzyganu