name === 'URL') { $regex = '# (?: (\\\\ (?: \\\\ | : ) ) ) #x'; $matches = preg_split($regex, $val, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); $newVal = ''; foreach($matches as $match) { switch($match) { case '\:' : $newVal.=':'; break; default : $newVal.=$match; break; } } $this->value = $newVal; } else { $this->value = $val; } } /** * Returns a raw mime-dir representation of the value. * * @return string */ public function getRawMimeDirValue() { if (is_array($this->value)) { return $this->value[0]; } else { return $this->value; } } }