[Formsess-devel] assign() accepting arrays
Status: Beta
Brought to you by:
mrkatana
|
From: David <da...@df...> - 2004-02-25 21:32:35
|
Hello, I just posted a feature request on sf.net that assign() should support arrays. I know there's assignArray() but people using formsess already know smarty, so why confusing them with another method? All that needs to be done is renaming assign() (maybe to assignValue()?) and build a wrapper similar to assignArray: function assign($field, $value = '', $force = false) { if (is_array($field)) { foreach ($array as $key => $value) { $this->assignValue($key, $value, $force); } } else { $this->assignValue($field, $value, $force); } } - david |