public function ClassMethods::setOptions in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-hydrator/src/ClassMethods.php \Zend\Hydrator\ClassMethods::setOptions()
Parameters
array|Traversable $options:
Return value
Throws
Exception\InvalidArgumentException
Overrides HydratorOptionsInterface::setOptions
File
- vendor/
zendframework/ zend-hydrator/ src/ ClassMethods.php, line 71
Class
Namespace
Zend\HydratorCode
public function setOptions($options) {
if ($options instanceof Traversable) {
$options = ArrayUtils::iteratorToArray($options);
}
elseif (!is_array($options)) {
throw new Exception\InvalidArgumentException('The options parameter must be an array or a Traversable');
}
if (isset($options['underscoreSeparatedKeys'])) {
$this
->setUnderscoreSeparatedKeys($options['underscoreSeparatedKeys']);
}
return $this;
}