You are here

private function ExplodeStrategy::setValueDelimiter in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php \Zend\Hydrator\Strategy\ExplodeStrategy::setValueDelimiter()

Sets the delimiter string that the values will be split upon

Parameters

string $delimiter:

Return value

self

1 call to ExplodeStrategy::setValueDelimiter()
ExplodeStrategy::__construct in vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php
Constructor

File

vendor/zendframework/zend-hydrator/src/Strategy/ExplodeStrategy.php, line 43

Class

ExplodeStrategy

Namespace

Zend\Hydrator\Strategy

Code

private function setValueDelimiter($delimiter) {
  if (!is_string($delimiter)) {
    throw new Exception\InvalidArgumentException(sprintf('%s expects Delimiter to be string, %s provided instead', __METHOD__, is_object($delimiter) ? get_class($delimiter) : gettype($delimiter)));
  }
  if (empty($delimiter)) {
    throw new Exception\InvalidArgumentException('Delimiter cannot be empty.');
  }
  $this->valueDelimiter = $delimiter;
}