allow usage of a closure for the `code` option of fields

this allows to do

```
'code' => function($object) {
	return $object->doSomethingMoreComplex();
}
```