/** * Return the value of current field * * @param FieldDefinition $fieldDefinition * @return null * @throws \OutOfBoundsException */ public function getFieldValue(FieldDefinition $fieldDefinition) { if (!$this->valid()) { throw new OutOfBoundsException(); } $current = $this->current(); return isset($current[$fieldDefinition->getFieldName()]) ? $current[$fieldDefinition->getFieldName()] : null; }