delimiter = $delimiter; } /** * processConfig(): defined by AbstractWriter. * * @param array $config * @return string * @throws Exception\UnprocessableConfigException for non-scalar values in * the $config array. */ public function processConfig(array $config) { $string = ''; foreach ($config as $key => $value) { if (! is_scalar($value)) { throw new Exception\UnprocessableConfigException(sprintf( '%s configuration writer can only process scalar values; received "%s" for key "%s"', __CLASS__, is_object($value) ? get_class($value) : gettype($value), $key )); } $value = (null === $value) ? '' : $value; $string .= sprintf( "%s%s%s\n", $key, $this->delimiter, $value ); } return $string; } }