Magento has a class called Varien_Object with a pattern I'm trying to identify. The pattern creates hidden data and allows access to it but the  main difference between this and a normal facade is that methods are dynamically created to allow access to this data.Here's a (very rough) example of pattern.$vo = new Varien_Object();// The Varian_Object allows data to be set using the setData method.$vo->setData('something', 'one');$vo->getData('something'); // -> one// Null is returned if the data isn't recognised.$vo->getData('does_not_exist'); // -> null// But here's the pattern I'm curious about. By default, the Varien_Object does// not have a setSomethingElse method.$vo->setSomethingElse('two');// Behind the scenes, the method name is checked and converted. The line above // is equivalent to this:$vo->setData('something_else', 'two');The magic set method has equivalent methods for get, has and uns (delete).My question is: does this pattern have a name and, if so, what is it?
What is the name of this design pattern?
design patterns;php
There's two parts here - handle an undefined method call.The first part is a means by which the language allows an object to handle a call to a method which was not defined. On Rosetta it's called  'Respond to an unknown method call'. Language capabilities are the opposite of design patterns - patterns exist to work around lack of capabilities in languages.The second part is to use the unknown method call capability to turn a call of the form setFoo(x) to a dictionary entry Foo -> x. I'm not aware of this being a named pattern; similar use cases in the other languages I know either are static and would use a dictionary here, or are fully dynamic and allow ad-hoc properties to be added. 