My question is: How do functions like setSomething(), getSomething() and unsSomething() work, while they are not defined anywhere?
I’m customising the iDEAL payment module to create my own. Everything is going fine, but for the purpose of documentation I’d like to know how this works:
In the controller (extending Mage_Core_Controller_Front_Action) there is a function:
public function failureAction ()
$session = Mage::getSingleton('checkout/session');
$session->setSomeErrorMessage($this->__('Some error message'));
And in the block file Failure.php ( extending Mage_Core_Block_Template) there is a function:
public function getErrorMessage ()
$error = Mage::getSingleton('checkout/session')->getSomeErrorMessage();
which is called upon in the template failure.phtml… And it works! The error message is saved and passed to the template, but how? Nowhere, not in any file, a function setSomeErrorMessage is defined.
So I’m guessing this is aranged in the Zend Framework? Or the Varien Framework?
And is there any reason the functions are called on the checkout/session class? Or could it be any class?