protected function StylesDefault::magicSet in Styles 7.2
Given an array of k/v pairs calls set$key
Parameters
array $properties:
1 call to StylesDefault::magicSet()
- StylesDefault::__construct in includes/
Styles.inc
File
- includes/
Styles.inc, line 66 - Styles.inc Base class for Styles.
Class
- StylesDefault
- @file Styles.inc Base class for Styles.
Code
protected function magicSet($properties) {
$methods = get_class_methods($this);
foreach ($properties as $key => $value) {
$propName = "set_{$key}";
$function = $this
->_toCamelCase($propName);
if (in_array($function, $methods)) {
$this
->{$function}($value);
}
}
}