public initialize ( array $options ) : void | ||
$options | array | |
Résultat | void |
public function initialize(array $options)
{
foreach ($options as $optionName => $optionValue) {
$methodName = 'set' . ucfirst($optionName);
if (method_exists($this, $methodName)) {
$this->{$methodName}($optionValue);
}
}
}