- $this->action = $action;
- $this->content = $content;
- $this->inreplyto = $inreplyto;
- $this->lat = $lat;
- $this->lon = $lon;
- $this->location_id = $location_id;
- $this->location_ns = $location_ns;
+ $prefill = array('content', 'inreplyto', 'lat',
+ 'lon', 'location_id', 'location_ns');
+
+ foreach ($prefill as $fieldName) {
+ if (array_key_exists($fieldName, $options)) {
+ $this->$fieldName = $options[$fieldName];
+ }
+ }