We’re rewarding the question askers & reputations are being recalculated! Read more.
2 edited tags
| link
1
source | link

Use Magic Methods in custom module

I want to make use of Magic Methods in my Custom Module.

I created a new Model with different member variables (variable1, variable2) and I want to get them like getVariable1.

How do I need to declare those member variables? Can I set them on private? What else am I missing?

Somewhere I read I need to save them in $_data['variable1'], but that doesn't work.

Thanks!