Merges the current style with the given style, using the given style as a base. This means that:
- if current style and base style both have property A set, use current style property's value
- if current style has property A set but base style does not, use current style property's value
- if base style has property A set but current style does not, use base style property's value
public mergeWith ( |
||
$baseStyle | ||
리턴 | New style corresponding to the merge of the 2 styles |
/** * Sets the style to be applied to the next written rows * until it is changed or reset. * * @param Style\Style $style * @return void */ private function setRowStyle($style) { // Merge given style with the default one to inherit custom properties $this->rowStyle = $style->mergeWith($this->defaultRowStyle); }