/** * Gets a field's value by the field's name * * @param string field name * @throws lang.IllegalArgumentException in case the field does not exist */ public function get($field) { if (!isset(Peer::forInstance($this)->types[$field])) { throw new IllegalArgumentException('Field "' . $field . '" does not exist for DataSet ' . $this->getClassName()); } return $this->{$field}; }