/**
* Set the object properties based on a named array/hash.
*
* @param mixed $properties Either an associative array or another object.
*
* @return boolean
*
* @since 1.7.0
*
* @see CMSObject::set()
*/
public function setProperties($properties)
{
if (\is_array($properties) || \is_object($properties)) {
foreach ((array) $properties as $k => $v) {
// Use the set function which might be overridden.
$this->set($k, $v);
}
return true;
}
return false;
}