public function __construct($options = [])
{
if (is_array($options) || $options instanceof \ArrayAccess) {
foreach ($options as $optionKey => $optionValue) {
$methodName = 'set' . ucfirst($optionKey);
if (method_exists($this, $methodName)) {
$this->{$methodName}($optionValue);
}
}
}
}