So I know that Zend does this in some way, but I'm not sure how. I also found this a hard topic to google on.
Code PHP:class my_class { private $var1; //I'd like to do this based on my_func input public function my_func($arr) { foreach ($arr as $var) { $this->$var = null; } } }
This might not make sense looking at it, but what I want to do is be able to introduce a new private variable to be used within the class. While this MAY work as is, I'm not able to define public/private. Any ideas?




Reply With Quote



One day we'll have to set up a mock project to see how it all actually plays out in code. I may put together a mock Symfony project so everyone can see how and why it doesn't happen.


Bookmarks