src/AbstractDataObject.php
public function defineMethods() {
		parent::defineMethods();
		// TODO how to handle method name collisions?
		foreach (static::config()->fields as $field) {
			$this->createMethod("set$field", sprintf('return $obj->setField("%s", $args[0]);', $field));
			$this->createMethod("get$field", sprintf('return $obj->getField("%s");', $field));
			//$this->addWrapperMethod("set$field", 'setField');
			//$this->addWrapperMethod("get$field", 'getField');
		}
		foreach (static::config()->lists as $field) {
			$this->createMethod("set$field", sprintf('return $obj->setList("%s", $args[0]);', $field));
			$this->createMethod("get$field", sprintf('return $obj->getList("%s");', $field));
			//$this->addWrapperMethod("set$field", 'setField');
			//$this->addWrapperMethod("get$field", 'getField');
		}
	}
public function defineMethods() {
		parent::defineMethods();
		// TODO how to handle method name collisions?
		foreach (static::config()->fields as $field) {
			$this->createMethod("set$field", sprintf('return $obj->setField("%s", $args[0]);', $field));
			$this->createMethod("get$field", sprintf('return $obj->getField("%s");', $field));
			//$this->addWrapperMethod("set$field", 'setField');
			//$this->addWrapperMethod("get$field", 'getField');
		}
		foreach (static::config()->lists as $field) {
			$this->createMethod("set$field", sprintf('return $obj->setList("%s", $args[0]);', $field));
			$this->createMethod("get$field", sprintf('return $obj->getList("%s");', $field));
			//$this->addWrapperMethod("set$field", 'setField');
			//$this->addWrapperMethod("get$field", 'getField');
		}
	}
}