/** * Fetch value. * * @param array $postvars post vars * * @return string fetched value */ public function fetchValue($postvars) { if ($this->hasFlag(self::AF_IP_SINGLEFIELD)) { return parent::fetchValue($postvars[$this->fieldName()]); } if (!$this->isPosted($postvars)) { return; } $parts = []; for ($i = 0; $i < 4; ++$i) { $parts[$i] = $postvars[$this->fieldName()][$i]; } return implode('.', $parts); }