- Shoudn't setField simply be dropped in favour of setFields()? --siebrand 19:45, 9 February 2012 (UTC)
- Shoudn't getField simply be dropped in favour of getFields()? --siebrand 19:46, 9 February 2012 (UTC)
These are not equivalent.
- setField sets a field, while setFields allows you to specify if you want to override the fields if they are already set or not. Merging these would also result into having to do
setFields( array( 'foo' => 'bar' ) )instead of
setField( 'foo', 'bar' )
- getField will attempt to get the field with the name you provided and complain if it is not set. getFields does not take any argument and simply returns all set fields.
-- Jeroen De Dauw 02:26, 10 February 2012 (UTC)
Apparently I misdocumented these functions a little - your remark makes perfect sense for what I originally wrote. It's corrected now :)
-- Jeroen De Dauw 02:34, 10 February 2012 (UTC)
- Thanks. --siebrand 08:24, 12 February 2012 (UTC)